/** * {@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->family_id !== null) { $size += 1; $size += $calculator->computeVarintSize($this->family_id->value()); } if ($this->candy !== null) { $size += 1; $size += $calculator->computeVarintSize($this->candy); } 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 += $calculator->computeVarintSize($this->pokemon_id->value()); } if ($this->model_scale !== null) { $size += 1; $size += 4; } if ($this->type !== null) { $size += 1; $size += $calculator->computeVarintSize($this->type->value()); } if ($this->type_2 !== null) { $size += 1; $size += $calculator->computeVarintSize($this->type_2->value()); } if ($this->camera !== null) { $innerSize = $this->camera->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->encounter !== null) { $innerSize = $this->encounter->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->stats !== null) { $innerSize = $this->stats->serializedSize($context); $size += 1; $size += $innerSize; $size += $calculator->computeVarintSize($innerSize); } if ($this->quick_moves !== null) { foreach ($this->quick_moves as $val) { $size += 1; $size += $calculator->computeVarintSize($val->value()); } } if ($this->cinematic_moves !== null) { foreach ($this->cinematic_moves as $val) { $size += 1; $size += $calculator->computeVarintSize($val->value()); } } if ($this->animation_time !== null) { foreach ($this->animation_time as $val) { $size += 1; $size += 4; } } if ($this->evolution_ids !== null) { foreach ($this->evolution_ids as $val) { $size += 1; $size += $calculator->computeVarintSize($val->value()); } } if ($this->evolution_pips !== null) { $size += 1; $size += $calculator->computeVarintSize($this->evolution_pips); } if ($this->rarity !== null) { $size += 1; $size += $calculator->computeVarintSize($this->rarity->value()); } if ($this->pokedex_height_m !== null) { $size += 1; $size += 4; } if ($this->pokedex_weight_kg !== null) { $size += 2; $size += 4; } if ($this->parent_pokemon_id !== null) { $size += 2; $size += $calculator->computeVarintSize($this->parent_pokemon_id->value()); } if ($this->height_std_dev !== null) { $size += 2; $size += 4; } if ($this->weight_std_dev !== null) { $size += 2; $size += 4; } if ($this->km_distance_to_hatch !== null) { $size += 2; $size += 4; } if ($this->family_id !== null) { $size += 2; $size += $calculator->computeVarintSize($this->family_id->value()); } if ($this->candy_to_evolve !== null) { $size += 2; $size += $calculator->computeVarintSize($this->candy_to_evolve); } if ($this->km_buddy_distance !== null) { $size += 2; $size += 4; } if ($this->buddy_size !== null) { $size += 2; $size += $calculator->computeVarintSize($this->buddy_size->value()); } if ($this->model_height !== null) { $size += 2; $size += 4; } if ($this->extensions !== null) { $size += $this->extensions->serializedSize($context); } return $size; }