/** * {@inheritdoc} */ public function serializedSize(\Protobuf\ComputeSizeContext $context) { $calculator = $context->getSizeCalculator(); $size = 0; if ($this->modifier_type !== null) { $size += 1; $size += $calculator->computeVarintSize($this->modifier_type->value()); } if ($this->fort_id !== null) { $size += 1; $size += $calculator->computeStringSize($this->fort_id); } if ($this->player_latitude !== null) { $size += 1; $size += 8; } if ($this->player_longitude !== null) { $size += 1; $size += 8; } if ($this->extensions !== null) { $size += $this->extensions->serializedSize($context); } return $size; }
/** * {@inheritdoc} */ public function serializedSize(\Protobuf\ComputeSizeContext $context) { $calculator = $context->getSizeCalculator(); $size = 0; if ($this->item_id !== null) { $size += 1; $size += $calculator->computeVarintSize($this->item_id->value()); } if ($this->item_type !== null) { $size += 1; $size += $calculator->computeVarintSize($this->item_type->value()); } if ($this->expire_ms !== null) { $size += 1; $size += $calculator->computeVarintSize($this->expire_ms); } if ($this->applied_ms !== null) { $size += 1; $size += $calculator->computeVarintSize($this->applied_ms); } if ($this->extensions !== null) { $size += $this->extensions->serializedSize($context); } return $size; }
/** * {@inheritdoc} */ public function serializedSize(\Protobuf\ComputeSizeContext $context) { $calculator = $context->getSizeCalculator(); $size = 0; if ($this->pokemon_id !== null) { $size += 1; $size += 8; } if ($this->item !== null) { $size += 1; $size += $calculator->computeVarintSize($this->item->value()); } if ($this->pokedex_entry_id !== null) { $size += 1; $size += $calculator->computeVarintSize($this->pokedex_entry_id); } if ($this->player_stats !== null) { $size += 1; $size += 1; } if ($this->player_currency !== null) { $size += 1; $size += 1; } if ($this->player_camera !== null) { $size += 1; $size += 1; } if ($this->inventory_upgrades !== null) { $size += 1; $size += 1; } if ($this->applied_items !== null) { $size += 1; $size += 1; } if ($this->egg_incubators !== null) { $size += 1; $size += 1; } if ($this->pokemon_family_id !== null) { $size += 1; $size += $calculator->computeVarintSize($this->pokemon_family_id->value()); } if ($this->quest_type !== null) { $size += 1; $size += $calculator->computeVarintSize($this->quest_type->value()); } if ($this->extensions !== null) { $size += $this->extensions->serializedSize($context); } return $size; }
/** * {@inheritdoc} */ public function serializedSize(\Protobuf\ComputeSizeContext $context) { $calculator = $context->getSizeCalculator(); $size = 0; if ($this->item_id !== null) { $size += 1; $size += $calculator->computeVarintSize($this->item_id->value()); } if ($this->encounter_id !== null) { $size += 1; $size += 8; } if ($this->spawn_point_id !== null) { $size += 1; $size += $calculator->computeStringSize($this->spawn_point_id); } if ($this->extensions !== null) { $size += $this->extensions->serializedSize($context); } return $size; }
/** * {@inheritdoc} */ public function serializedSize(\Protobuf\ComputeSizeContext $context) { $calculator = $context->getSizeCalculator(); $size = 0; if ($this->item_id !== null) { $size += 1; $size += $calculator->computeVarintSize($this->item_id->value()); } if ($this->expiration_timestamp_ms !== null) { $size += 1; $size += $calculator->computeVarintSize($this->expiration_timestamp_ms); } if ($this->deployer_player_codename !== null) { $size += 1; $size += $calculator->computeStringSize($this->deployer_player_codename); } if ($this->extensions !== null) { $size += $this->extensions->serializedSize($context); } return $size; }
/** * {@inheritdoc} */ public function serializedSize(\Protobuf\ComputeSizeContext $context) { $calculator = $context->getSizeCalculator(); $size = 0; if ($this->encounter_id !== null) { $size += 1; $size += 8; } if ($this->pokeball !== null) { $size += 1; $size += $calculator->computeVarintSize($this->pokeball->value()); } if ($this->normalized_reticle_size !== null) { $size += 1; $size += 8; } if ($this->spawn_point_id !== null) { $size += 1; $size += $calculator->computeStringSize($this->spawn_point_id); } if ($this->hit_pokemon !== null) { $size += 1; $size += 1; } if ($this->spin_modifier !== null) { $size += 1; $size += 8; } if ($this->normalized_hit_position !== null) { $size += 1; $size += 8; } if ($this->extensions !== null) { $size += $this->extensions->serializedSize($context); } return $size; }
/** * {@inheritdoc} */ public function serializedSize(\Protobuf\ComputeSizeContext $context) { $calculator = $context->getSizeCalculator(); $size = 0; if ($this->id !== null) { $size += 1; $size += $calculator->computeStringSize($this->id); } if ($this->item_id !== null) { $size += 1; $size += $calculator->computeVarintSize($this->item_id->value()); } if ($this->incubator_type !== null) { $size += 1; $size += $calculator->computeVarintSize($this->incubator_type->value()); } if ($this->uses_remaining !== null) { $size += 1; $size += $calculator->computeVarintSize($this->uses_remaining); } if ($this->pokemon_id !== null) { $size += 1; $size += $calculator->computeVarintSize($this->pokemon_id); } if ($this->start_km_walked !== null) { $size += 1; $size += 8; } if ($this->target_km_walked !== null) { $size += 1; $size += 8; } if ($this->extensions !== null) { $size += $this->extensions->serializedSize($context); } return $size; }
/** * {@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 serializedSize(\Protobuf\ComputeSizeContext $context) { $calculator = $context->getSizeCalculator(); $size = 0; if ($this->item_id !== null) { $size += 1; $size += $calculator->computeVarintSize($this->item_id->value()); } if ($this->item_type !== null) { $size += 1; $size += $calculator->computeVarintSize($this->item_type->value()); } if ($this->category !== null) { $size += 1; $size += $calculator->computeVarintSize($this->category->value()); } if ($this->drop_freq !== null) { $size += 1; $size += 4; } if ($this->drop_trainer_level !== null) { $size += 1; $size += $calculator->computeVarintSize($this->drop_trainer_level); } if ($this->pokeball !== null) { $innerSize = $this->pokeball->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->potion !== null) { $innerSize = $this->potion->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->revive !== null) { $innerSize = $this->revive->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->battle !== null) { $innerSize = $this->battle->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->food !== null) { $innerSize = $this->food->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->inventory_upgrade !== null) { $innerSize = $this->inventory_upgrade->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->xp_boost !== null) { $innerSize = $this->xp_boost->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->incense !== null) { $innerSize = $this->incense->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->egg_incubator !== null) { $innerSize = $this->egg_incubator->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->fort_modifier !== null) { $innerSize = $this->fort_modifier->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->extensions !== null) { $size += $this->extensions->serializedSize($context); } return $size; }
/** * {@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) { $innerSize = $reader->readVarint($stream); $innerLimit = $stream->tell() + $innerSize; if ($this->pokeball_type === null) { $this->pokeball_type = new \Protobuf\EnumCollection(); } while ($stream->tell() < $innerLimit) { $this->pokeball_type->add(\POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream))); } continue; } if ($tag === 2) { $innerSize = $reader->readVarint($stream); $innerLimit = $stream->tell() + $innerSize; if ($this->capture_probability === null) { $this->capture_probability = new \Protobuf\ScalarCollection(); } while ($stream->tell() < $innerLimit) { $this->capture_probability->add($reader->readFloat($stream)); } continue; } if ($tag === 12) { \Protobuf\WireFormat::assertWireType($wire, 1); $this->reticle_difficulty_scale = $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); } }
/** * {@inheritdoc} */ public function serializedSize(\Protobuf\ComputeSizeContext $context) { $calculator = $context->getSizeCalculator(); $size = 0; if ($this->id !== null) { $size += 1; $size += 8; } if ($this->pokemon_id !== null) { $size += 1; $size += $calculator->computeVarintSize($this->pokemon_id->value()); } if ($this->cp !== null) { $size += 1; $size += $calculator->computeVarintSize($this->cp); } if ($this->stamina !== null) { $size += 1; $size += $calculator->computeVarintSize($this->stamina); } if ($this->stamina_max !== null) { $size += 1; $size += $calculator->computeVarintSize($this->stamina_max); } if ($this->move_1 !== null) { $size += 1; $size += $calculator->computeVarintSize($this->move_1->value()); } if ($this->move_2 !== null) { $size += 1; $size += $calculator->computeVarintSize($this->move_2->value()); } if ($this->deployed_fort_id !== null) { $size += 1; $size += $calculator->computeStringSize($this->deployed_fort_id); } if ($this->owner_name !== null) { $size += 1; $size += $calculator->computeStringSize($this->owner_name); } if ($this->is_egg !== null) { $size += 1; $size += 1; } if ($this->egg_km_walked_target !== null) { $size += 1; $size += 8; } if ($this->egg_km_walked_start !== null) { $size += 1; $size += 8; } if ($this->origin !== null) { $size += 1; $size += $calculator->computeVarintSize($this->origin); } if ($this->height_m !== null) { $size += 1; $size += 4; } if ($this->weight_kg !== null) { $size += 2; $size += 4; } if ($this->individual_attack !== null) { $size += 2; $size += $calculator->computeVarintSize($this->individual_attack); } if ($this->individual_defense !== null) { $size += 2; $size += $calculator->computeVarintSize($this->individual_defense); } if ($this->individual_stamina !== null) { $size += 2; $size += $calculator->computeVarintSize($this->individual_stamina); } if ($this->cp_multiplier !== null) { $size += 2; $size += 4; } if ($this->pokeball !== null) { $size += 2; $size += $calculator->computeVarintSize($this->pokeball->value()); } if ($this->captured_cell_id !== null) { $size += 2; $size += $calculator->computeVarintSize($this->captured_cell_id); } if ($this->battles_attacked !== null) { $size += 2; $size += $calculator->computeVarintSize($this->battles_attacked); } if ($this->battles_defended !== null) { $size += 2; $size += $calculator->computeVarintSize($this->battles_defended); } if ($this->egg_incubator_id !== null) { $size += 2; $size += $calculator->computeStringSize($this->egg_incubator_id); } if ($this->creation_time_ms !== null) { $size += 2; $size += $calculator->computeVarintSize($this->creation_time_ms); } if ($this->num_upgrades !== null) { $size += 2; $size += $calculator->computeVarintSize($this->num_upgrades); } if ($this->additional_cp_multiplier !== null) { $size += 2; $size += 4; } if ($this->favorite !== null) { $size += 2; $size += $calculator->computeVarintSize($this->favorite); } if ($this->nickname !== null) { $size += 2; $size += $calculator->computeStringSize($this->nickname); } if ($this->from_fort !== null) { $size += 2; $size += $calculator->computeVarintSize($this->from_fort); } if ($this->buddy_candy_awarded !== null) { $size += 2; $size += $calculator->computeVarintSize($this->buddy_candy_awarded); } if ($this->buddy_total_km_walked !== null) { $size += 2; $size += 4; } if ($this->display_pokemon_id !== null) { $size += 2; $size += $calculator->computeVarintSize($this->display_pokemon_id); } if ($this->display_cp !== null) { $size += 2; $size += $calculator->computeVarintSize($this->display_cp); } if ($this->extensions !== null) { $size += $this->extensions->serializedSize($context); } return $size; }
/** * {@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->id = $reader->readString($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, 14); $this->owned_by_team = \POGOProtos\Enums\TeamColor::valueOf($reader->readVarint($stream)); continue; } if ($tag === 6) { \Protobuf\WireFormat::assertWireType($wire, 14); $this->guard_pokemon_id = \POGOProtos\Enums\PokemonId::valueOf($reader->readVarint($stream)); continue; } if ($tag === 7) { \Protobuf\WireFormat::assertWireType($wire, 5); $this->guard_pokemon_cp = $reader->readVarint($stream); continue; } if ($tag === 8) { \Protobuf\WireFormat::assertWireType($wire, 8); $this->enabled = $reader->readBool($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, 3); $this->gym_points = $reader->readVarint($stream); continue; } if ($tag === 11) { \Protobuf\WireFormat::assertWireType($wire, 8); $this->is_in_battle = $reader->readBool($stream); continue; } if ($tag === 12) { $innerSize = $reader->readVarint($stream); $innerLimit = $stream->tell() + $innerSize; if ($this->active_fort_modifier === null) { $this->active_fort_modifier = new \Protobuf\EnumCollection(); } while ($stream->tell() < $innerLimit) { $this->active_fort_modifier->add(\POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream))); } continue; } if ($tag === 13) { \Protobuf\WireFormat::assertWireType($wire, 11); $innerSize = $reader->readVarint($stream); $innerMessage = new \POGOProtos\Map\Fort\FortLureInfo(); $this->lure_info = $innerMessage; $context->setLength($innerSize); $innerMessage->readFrom($context); $context->setLength($length); continue; } if ($tag === 14) { \Protobuf\WireFormat::assertWireType($wire, 3); $this->cooldown_complete_timestamp_ms = $reader->readVarint($stream); continue; } if ($tag === 15) { \Protobuf\WireFormat::assertWireType($wire, 14); $this->sponsor = \POGOProtos\Map\Fort\FortSponsor::valueOf($reader->readVarint($stream)); continue; } if ($tag === 16) { \Protobuf\WireFormat::assertWireType($wire, 14); $this->rendering_type = \POGOProtos\Map\Fort\FortRenderingType::valueOf($reader->readVarint($stream)); continue; } if ($tag === 17) { \Protobuf\WireFormat::assertWireType($wire, 3); $this->deploy_lockout_end_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, 9); $this->sku = $reader->readString($stream); continue; } if ($tag === 2) { \Protobuf\WireFormat::assertWireType($wire, 14); $this->category = \POGOProtos\Enums\HoloIapItemCategory::valueOf($reader->readVarint($stream)); continue; } if ($tag === 3) { \Protobuf\WireFormat::assertWireType($wire, 5); $this->sort_order = $reader->readVarint($stream); continue; } if ($tag === 4) { $innerSize = $reader->readVarint($stream); $innerLimit = $stream->tell() + $innerSize; if ($this->item_ids === null) { $this->item_ids = new \Protobuf\EnumCollection(); } while ($stream->tell() < $innerLimit) { $this->item_ids->add(\POGOProtos\Inventory\Item\ItemId::valueOf($reader->readVarint($stream))); } continue; } if ($tag === 5) { $innerSize = $reader->readVarint($stream); $innerLimit = $stream->tell() + $innerSize; if ($this->counts === null) { $this->counts = new \Protobuf\ScalarCollection(); } while ($stream->tell() < $innerLimit) { $this->counts->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); } }