Пример #1
0
 /**
  * {@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->item_id = \POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->item_type = \POGOProtos\Inventory\Item\ItemType::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->category = \POGOProtos\Enums\ItemCategory::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->drop_freq = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->drop_trainer_level = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Settings\Master\Item\PokeballAttributes();
             $this->pokeball = $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\Settings\Master\Item\PotionAttributes();
             $this->potion = $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\Settings\Master\Item\ReviveAttributes();
             $this->revive = $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\Settings\Master\Item\BattleAttributes();
             $this->battle = $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\Settings\Master\Item\FoodAttributes();
             $this->food = $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\Settings\Master\Item\InventoryUpgradeAttributes();
             $this->inventory_upgrade = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Settings\Master\Item\ExperienceBoostAttributes();
             $this->xp_boost = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Settings\Master\Item\IncenseAttributes();
             $this->incense = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 14) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Settings\Master\Item\EggIncubatorAttributes();
             $this->egg_incubator = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 15) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Settings\Master\Item\FortModifierAttributes();
             $this->fort_modifier = $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, 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->incense_type = \POGOProtos\Inventory\Item\ItemId::valueOf($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 \google\protobuf\SourceCodeInfo\Location();
             if ($this->location === null) {
                 $this->location = new \Protobuf\MessageCollection();
             }
             $this->location->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, 8);
             $this->success = $reader->readBool($stream);
             continue;
         }
         if ($tag === 2) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->awarded_badges === null) {
                 $this->awarded_badges = new \Protobuf\EnumCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->awarded_badges->add(\POGOProtos\Enums\BadgeType::valueOf($reader->readVarint($stream)));
             }
             continue;
         }
         if ($tag === 3) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->awarded_badge_levels === null) {
                 $this->awarded_badge_levels = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->awarded_badge_levels->add($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);
     }
 }
Пример #6
0
 /**
  * {@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\Networking\Envelopes\UnknownMessage();
             if ($this->field1 === null) {
                 $this->field1 = new \Protobuf\MessageCollection();
             }
             $this->field1->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->timestamp_since_start = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->field3 = $reader->readString($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Networking\Envelopes\Signature\LocationFix();
             if ($this->location_fix === null) {
                 $this->location_fix = new \Protobuf\MessageCollection();
             }
             $this->location_fix->add($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\Networking\Envelopes\Signature\AndroidGpsInfo();
             if ($this->gps_info === null) {
                 $this->gps_info = new \Protobuf\MessageCollection();
             }
             $this->gps_info->add($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\Networking\Envelopes\UnknownMessage();
             if ($this->field6 === null) {
                 $this->field6 = new \Protobuf\MessageCollection();
             }
             $this->field6->add($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\Networking\Envelopes\Signature\SensorInfo();
             if ($this->sensor_info === null) {
                 $this->sensor_info = new \Protobuf\MessageCollection();
             }
             $this->sensor_info->add($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\Networking\Envelopes\Signature\DeviceInfo();
             $this->device_info = $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\Networking\Envelopes\Signature\ActivityStatus();
             $this->activity_status = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->location_hash1 = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->field11 = $reader->readBool($stream);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->field12 = $reader->readBool($stream);
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->field13 = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 14) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->field14 = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 15) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->field15 = $reader->readString($stream);
             continue;
         }
         if ($tag === 16) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->field16 = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 17) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->field17 = $reader->readString($stream);
             continue;
         }
         if ($tag === 18) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->field18 = $reader->readString($stream);
             continue;
         }
         if ($tag === 19) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->field19 = $reader->readBool($stream);
             continue;
         }
         if ($tag === 20) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->location_hash2 = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 21) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->field21 = $reader->readBool($stream);
             continue;
         }
         if ($tag === 22) {
             \Protobuf\WireFormat::assertWireType($wire, 12);
             $this->session_hash = $reader->readByteStream($stream);
             continue;
         }
         if ($tag === 23) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->timestamp = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 24) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->request_hash === null) {
                 $this->request_hash = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->request_hash->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 25) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->unknown25 = $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);
     }
 }
Пример #7
0
 /**
  * {@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, 9);
             $this->spawn_point_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->player_latitude = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->player_longitude = $reader->readDouble($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);
     }
 }
Пример #8
0
 /**
  * {@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->pokemon_id = \POGOProtos\Enums\PokemonId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->model_scale = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->type = \POGOProtos\Enums\PokemonType::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->type_2 = \POGOProtos\Enums\PokemonType::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Settings\Master\Pokemon\CameraAttributes();
             $this->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\Settings\Master\Pokemon\EncounterAttributes();
             $this->encounter = $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\Settings\Master\Pokemon\StatsAttributes();
             $this->stats = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 9) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->quick_moves === null) {
                 $this->quick_moves = new \Protobuf\EnumCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->quick_moves->add(\POGOProtos\Enums\PokemonMove::valueOf($reader->readVarint($stream)));
             }
             continue;
         }
         if ($tag === 10) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->cinematic_moves === null) {
                 $this->cinematic_moves = new \Protobuf\EnumCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->cinematic_moves->add(\POGOProtos\Enums\PokemonMove::valueOf($reader->readVarint($stream)));
             }
             continue;
         }
         if ($tag === 11) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->animation_time === null) {
                 $this->animation_time = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->animation_time->add($reader->readFloat($stream));
             }
             continue;
         }
         if ($tag === 12) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->evolution_ids === null) {
                 $this->evolution_ids = new \Protobuf\EnumCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->evolution_ids->add(\POGOProtos\Enums\PokemonId::valueOf($reader->readVarint($stream)));
             }
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->evolution_pips = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 14) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->rarity = \POGOProtos\Enums\PokemonRarity::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 15) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->pokedex_height_m = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 16) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->pokedex_weight_kg = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 17) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->parent_pokemon_id = \POGOProtos\Enums\PokemonId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 18) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->height_std_dev = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 19) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->weight_std_dev = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 20) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->km_distance_to_hatch = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 21) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->family_id = \POGOProtos\Enums\PokemonFamilyId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 22) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->candy_to_evolve = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 23) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->km_buddy_distance = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 24) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->buddy_size = \POGOProtos\Settings\Master\PokemonSettings\BuddySize::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 25) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->model_height = $reader->readFloat($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);
     }
 }
Пример #9
0
 /**
  * {@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->item_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->is_iap = $reader->readBool($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Player\Currency();
             $this->currency_to_buy = $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\Currency();
             $this->yields_currency = $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\Inventory\Item\ItemData();
             $this->yields_item = $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\Networking\Platform\Responses\GetStoreItemsResponse\StoreItem\TagsEntry();
             if ($this->tags === null) {
                 $this->tags = new \Protobuf\MessageCollection();
             }
             $this->tags->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->unknown7 = $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);
     }
 }
Пример #10
0
 /**
  * {@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->device_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->android_board_name = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->android_bootloader = $reader->readString($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_brand = $reader->readString($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_model = $reader->readString($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_model_identifier = $reader->readString($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->device_model_boot = $reader->readString($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->hardware_manufacturer = $reader->readString($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->hardware_model = $reader->readString($stream);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->firmware_brand = $reader->readString($stream);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->firmware_tags = $reader->readString($stream);
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->firmware_type = $reader->readString($stream);
             continue;
         }
         if ($tag === 14) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->firmware_fingerprint = $reader->readString($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, 14);
             $this->result = \POGOProtos\Networking\Responses\CollectDailyDefenderBonusResponse\Result::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             if ($this->currency_type === null) {
                 $this->currency_type = new \Protobuf\ScalarCollection();
             }
             $this->currency_type->add($reader->readString($stream));
             continue;
         }
         if ($tag === 3) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->currency_awarded === null) {
                 $this->currency_awarded = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->currency_awarded->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->defenders_count = $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);
     }
 }
Пример #12
0
 /**
  * {@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->gym_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->battle_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Battle\BattleAction();
             if ($this->attack_actions === null) {
                 $this->attack_actions = new \Protobuf\MessageCollection();
             }
             $this->attack_actions->add($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\Battle\BattleAction();
             $this->last_retrieved_action = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->player_latitude = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->player_longitude = $reader->readDouble($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);
     }
 }
Пример #13
0
 /**
  * {@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->badge_type = \POGOProtos\Enums\BadgeType::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->badge_rank = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->targets === null) {
                 $this->targets = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->targets->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Badge\BadgeCaptureReward();
             if ($this->capture_reward === null) {
                 $this->capture_reward = new \Protobuf\MessageCollection();
             }
             $this->capture_reward->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);
     }
 }
Пример #14
0
 /**
  * {@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 === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->skin = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->hair = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->shirt = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->pants = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->hat = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->shoes = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->gender = \POGOProtos\Enums\Gender::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->eyes = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->backpack = $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);
     }
 }
Пример #15
0
 /**
  * {@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\Gym\GymState();
             $this->gym_state = $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\Data\Battle\BattleParticipant();
             if ($this->attackers === null) {
                 $this->attackers = new \Protobuf\MessageCollection();
             }
             $this->attackers->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 3) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->player_experience_awarded === null) {
                 $this->player_experience_awarded = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->player_experience_awarded->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->next_defender_pokemon_id = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->gym_points_delta = $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 === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \google\protobuf\UninterpretedOption\NamePart();
             if ($this->name === null) {
                 $this->name = new \Protobuf\MessageCollection();
             }
             $this->name->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->identifier_value = $reader->readString($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 4);
             $this->positive_int_value = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->negative_int_value = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 1);
             $this->double_value = $reader->readDouble($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 12);
             $this->string_value = $reader->readByteStream($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->aggregate_value = $reader->readString($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);
     }
 }
Пример #17
0
 /**
  * {@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, 14);
             $this->result = \POGOProtos\Networking\Responses\LevelUpRewardsResponse\Result::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Inventory\Item\ItemAward();
             if ($this->items_awarded === null) {
                 $this->items_awarded = new \Protobuf\MessageCollection();
             }
             $this->items_awarded->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 4) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->items_unlocked === null) {
                 $this->items_unlocked = new \Protobuf\EnumCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->items_unlocked->add(\POGOProtos\Inventory\Item\ItemId::valueOf($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, 14);
             $this->result = \POGOProtos\Networking\Responses\StartGymBattleResponse\Result::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->battle_start_timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->battle_end_timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->battle_id = $reader->readString($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Battle\BattleParticipant();
             $this->defender = $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\Battle\BattleLog();
             $this->battle_log = $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\Data\Battle\BattleParticipant();
             $this->attacker = $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);
     }
 }
Пример #20
0
 /**
  * {@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->type = \POGOProtos\Data\Battle\BattleActionType::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->action_start_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->duration_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->energy_delta = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->attacker_index = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->target_index = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 6);
             $this->active_pokemon_id = $reader->readFixed64($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Battle\BattleParticipant();
             $this->player_joined = $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\Data\Battle\BattleResults();
             $this->battle_results = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->damage_windows_start_timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->damage_windows_end_timestamp_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\Battle\BattleParticipant();
             $this->player_left = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 14) {
             \Protobuf\WireFormat::assertWireType($wire, 6);
             $this->target_pokemon_id = $reader->readFixed64($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);
     }
 }
Пример #21
0
 /**
  * {@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, 2);
             $this->energy_per_sec = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->dodge_energy_cost = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->retarget_seconds = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->enemy_attack_interval = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->attack_server_interval = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->round_duration_seconds = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->bonus_time_per_ally_seconds = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->maximum_attackers_per_battle = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->same_type_attack_bonus_multiplier = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->maximum_energy = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->energy_delta_per_health_lost = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->dodge_duration_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 13) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->minimum_player_level = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 14) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->swap_duration_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 15) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->dodge_damage_reduction_percent = $reader->readFloat($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, 9);
             $this->name = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->number = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->label = \google\protobuf\FieldDescriptorProto\Label::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->type = \google\protobuf\FieldDescriptorProto\Type::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->type_name = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->extendee = $reader->readString($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->default_value = $reader->readString($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->oneof_index = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->json_name = $reader->readString($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \google\protobuf\FieldOptions();
             $this->options = $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);
     }
 }
Пример #23
0
 /**
  * {@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, 6);
             $this->encounter_id = $reader->readFixed64($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 14);
             $this->active_pokemon_id = \POGOProtos\Enums\PokemonId::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->lure_expires_timestamp_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);
     }
 }
Пример #24
0
 /**
  * {@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\Battle\BattlePokemonInfo();
             $this->active_pokemon = $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\Data\Player\PlayerPublicProfile();
             $this->trainer_public_profile = $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\Battle\BattlePokemonInfo();
             if ($this->reverse_pokemon === null) {
                 $this->reverse_pokemon = new \Protobuf\MessageCollection();
             }
             $this->reverse_pokemon->add($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\Battle\BattlePokemonInfo();
             if ($this->defeated_pokemon === null) {
                 $this->defeated_pokemon = new \Protobuf\MessageCollection();
             }
             $this->defeated_pokemon->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, 5);
             $this->buckets_per_day = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->streak_length = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->bonus_multiplier = $reader->readFloat($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 2);
             $this->streak_bonus_multiplier = $reader->readFloat($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);
     }
 }
Пример #26
0
 /**
  * {@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, 5);
             $this->daily_bonus_coins = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             $innerSize = $reader->readVarint($stream);
             $innerLimit = $stream->tell() + $innerSize;
             if ($this->daily_defender_bonus_per_pokemon === null) {
                 $this->daily_defender_bonus_per_pokemon = new \Protobuf\ScalarCollection();
             }
             while ($stream->tell() < $innerLimit) {
                 $this->daily_defender_bonus_per_pokemon->add($reader->readVarint($stream));
             }
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             $this->daily_defender_bonus_max_defenders = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             if ($this->daily_defender_bonus_currency === null) {
                 $this->daily_defender_bonus_currency = new \Protobuf\ScalarCollection();
             }
             $this->daily_defender_bonus_currency->add($reader->readString($stream));
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 3);
             $this->min_time_between_claims_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->daily_bonus_enabled = $reader->readBool($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->daily_defender_bonus_enabled = $reader->readBool($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);
     }
 }
Пример #27
0
 /**
  * {@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, 4);
             $this->start_time_ms = $reader->readVarint($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->unknown_status = $reader->readBool($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->walking = $reader->readBool($stream);
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->running = $reader->readBool($stream);
             continue;
         }
         if ($tag === 5) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->stationary = $reader->readBool($stream);
             continue;
         }
         if ($tag === 6) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->automotive = $reader->readBool($stream);
             continue;
         }
         if ($tag === 7) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->tilting = $reader->readBool($stream);
             continue;
         }
         if ($tag === 8) {
             \Protobuf\WireFormat::assertWireType($wire, 8);
             $this->cycling = $reader->readBool($stream);
             continue;
         }
         if ($tag === 9) {
             \Protobuf\WireFormat::assertWireType($wire, 12);
             $this->status = $reader->readByteStream($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, 9);
             $this->name = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \google\protobuf\FieldDescriptorProto();
             if ($this->field === null) {
                 $this->field = new \Protobuf\MessageCollection();
             }
             $this->field->add($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 \google\protobuf\FieldDescriptorProto();
             if ($this->extension === null) {
                 $this->extension = new \Protobuf\MessageCollection();
             }
             $this->extension->add($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 \google\protobuf\DescriptorProto();
             if ($this->nested_type === null) {
                 $this->nested_type = new \Protobuf\MessageCollection();
             }
             $this->nested_type->add($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 \google\protobuf\EnumDescriptorProto();
             if ($this->enum_type === null) {
                 $this->enum_type = new \Protobuf\MessageCollection();
             }
             $this->enum_type->add($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 \google\protobuf\DescriptorProto\ExtensionRange();
             if ($this->extension_range === null) {
                 $this->extension_range = new \Protobuf\MessageCollection();
             }
             $this->extension_range->add($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 \google\protobuf\OneofDescriptorProto();
             if ($this->oneof_decl === null) {
                 $this->oneof_decl = new \Protobuf\MessageCollection();
             }
             $this->oneof_decl->add($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 \google\protobuf\MessageOptions();
             $this->options = $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 \google\protobuf\DescriptorProto\ReservedRange();
             if ($this->reserved_range === null) {
                 $this->reserved_range = new \Protobuf\MessageCollection();
             }
             $this->reserved_range->add($innerMessage);
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             if ($this->reserved_name === null) {
                 $this->reserved_name = new \Protobuf\ScalarCollection();
             }
             $this->reserved_name->add($reader->readString($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);
     }
 }
Пример #29
0
 /**
  * {@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->status = \POGOProtos\Networking\Responses\SetAvatarResponse\Status::valueOf($reader->readVarint($stream));
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \POGOProtos\Data\PlayerData();
             $this->player_data = $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, 9);
             $this->name = $reader->readString($stream);
             continue;
         }
         if ($tag === 2) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->package = $reader->readString($stream);
             continue;
         }
         if ($tag === 3) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             if ($this->dependency === null) {
                 $this->dependency = new \Protobuf\ScalarCollection();
             }
             $this->dependency->add($reader->readString($stream));
             continue;
         }
         if ($tag === 10) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             if ($this->public_dependency === null) {
                 $this->public_dependency = new \Protobuf\ScalarCollection();
             }
             $this->public_dependency->add($reader->readVarint($stream));
             continue;
         }
         if ($tag === 11) {
             \Protobuf\WireFormat::assertWireType($wire, 5);
             if ($this->weak_dependency === null) {
                 $this->weak_dependency = new \Protobuf\ScalarCollection();
             }
             $this->weak_dependency->add($reader->readVarint($stream));
             continue;
         }
         if ($tag === 4) {
             \Protobuf\WireFormat::assertWireType($wire, 11);
             $innerSize = $reader->readVarint($stream);
             $innerMessage = new \google\protobuf\DescriptorProto();
             if ($this->message_type === null) {
                 $this->message_type = new \Protobuf\MessageCollection();
             }
             $this->message_type->add($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 \google\protobuf\EnumDescriptorProto();
             if ($this->enum_type === null) {
                 $this->enum_type = new \Protobuf\MessageCollection();
             }
             $this->enum_type->add($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 \google\protobuf\ServiceDescriptorProto();
             if ($this->service === null) {
                 $this->service = new \Protobuf\MessageCollection();
             }
             $this->service->add($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 \google\protobuf\FieldDescriptorProto();
             if ($this->extension === null) {
                 $this->extension = new \Protobuf\MessageCollection();
             }
             $this->extension->add($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 \google\protobuf\FileOptions();
             $this->options = $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 \google\protobuf\SourceCodeInfo();
             $this->source_code_info = $innerMessage;
             $context->setLength($innerSize);
             $innerMessage->readFrom($context);
             $context->setLength($length);
             continue;
         }
         if ($tag === 12) {
             \Protobuf\WireFormat::assertWireType($wire, 9);
             $this->syntax = $reader->readString($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);
     }
 }