作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->item_id !== null) {
$writer->writeVarint($stream, 8);
$writer->writeVarint($stream, $this->item_id->value());
}
if ($this->pokemon_id !== null) {
$writer->writeVarint($stream, 17);
$writer->writeFixed64($stream, $this->pokemon_id);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->incense_type !== null) {
$writer->writeVarint($stream, 8);
$writer->writeVarint($stream, $this->incense_type->value());
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->fort_id !== null) {
$writer->writeVarint($stream, 10);
$writer->writeString($stream, $this->fort_id);
}
if ($this->team_color !== null) {
$writer->writeVarint($stream, 16);
$writer->writeVarint($stream, $this->team_color->value());
}
if ($this->pokemon_data !== null) {
$writer->writeVarint($stream, 26);
$writer->writeVarint($stream, $this->pokemon_data->serializedSize($sizeContext));
$this->pokemon_data->writeTo($context);
}
if ($this->name !== null) {
$writer->writeVarint($stream, 34);
$writer->writeString($stream, $this->name);
}
if ($this->image_urls !== null) {
foreach ($this->image_urls as $val) {
$writer->writeVarint($stream, 42);
$writer->writeString($stream, $val);
}
}
if ($this->fp !== null) {
$writer->writeVarint($stream, 48);
$writer->writeVarint($stream, $this->fp);
}
if ($this->stamina !== null) {
$writer->writeVarint($stream, 56);
$writer->writeVarint($stream, $this->stamina);
}
if ($this->max_stamina !== null) {
$writer->writeVarint($stream, 64);
$writer->writeVarint($stream, $this->max_stamina);
}
if ($this->type !== null) {
$writer->writeVarint($stream, 72);
$writer->writeVarint($stream, $this->type->value());
}
if ($this->latitude !== null) {
$writer->writeVarint($stream, 81);
$writer->writeDouble($stream, $this->latitude);
}
if ($this->longitude !== null) {
$writer->writeVarint($stream, 89);
$writer->writeDouble($stream, $this->longitude);
}
if ($this->description !== null) {
$writer->writeVarint($stream, 98);
$writer->writeString($stream, $this->description);
}
if ($this->modifiers !== null) {
foreach ($this->modifiers as $val) {
$writer->writeVarint($stream, 106);
$writer->writeVarint($stream, $val->serializedSize($sizeContext));
$val->writeTo($context);
}
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->result !== null) {
$writer->writeVarint($stream, 8);
$writer->writeVarint($stream, $this->result->value());
}
if ($this->log_entries !== null) {
foreach ($this->log_entries as $val) {
$writer->writeVarint($stream, 18);
$writer->writeVarint($stream, $val->serializedSize($sizeContext));
$val->writeTo($context);
}
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->fort_id !== null) {
$writer->writeVarint($stream, 10);
$writer->writeString($stream, $this->fort_id);
}
if ($this->encounter_id !== null) {
$writer->writeVarint($stream, 17);
$writer->writeFixed64($stream, $this->encounter_id);
}
if ($this->active_pokemon_id !== null) {
$writer->writeVarint($stream, 24);
$writer->writeVarint($stream, $this->active_pokemon_id->value());
}
if ($this->lure_expires_timestamp_ms !== null) {
$writer->writeVarint($stream, 32);
$writer->writeVarint($stream, $this->lure_expires_timestamp_ms);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->encounter_id !== null) {
$writer->writeVarint($stream, 9);
$writer->writeFixed64($stream, $this->encounter_id);
}
if ($this->spawn_point_id !== null) {
$writer->writeVarint($stream, 18);
$writer->writeString($stream, $this->spawn_point_id);
}
if ($this->player_latitude !== null) {
$writer->writeVarint($stream, 25);
$writer->writeDouble($stream, $this->player_latitude);
}
if ($this->player_longitude !== null) {
$writer->writeVarint($stream, 33);
$writer->writeDouble($stream, $this->player_longitude);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->pokemon_id !== null) {
$writer->writeVarint($stream, 8);
$writer->writeVarint($stream, $this->pokemon_id->value());
}
if ($this->times_encountered !== null) {
$writer->writeVarint($stream, 16);
$writer->writeVarint($stream, $this->times_encountered);
}
if ($this->times_captured !== null) {
$writer->writeVarint($stream, 24);
$writer->writeVarint($stream, $this->times_captured);
}
if ($this->evolution_stone_pieces !== null) {
$writer->writeVarint($stream, 32);
$writer->writeVarint($stream, $this->evolution_stone_pieces);
}
if ($this->evolution_stones !== null) {
$writer->writeVarint($stream, 40);
$writer->writeVarint($stream, $this->evolution_stones);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->spawn_point_id !== null) {
$writer->writeVarint($stream, 10);
$writer->writeString($stream, $this->spawn_point_id);
}
if ($this->encounter_id !== null) {
$writer->writeVarint($stream, 17);
$writer->writeFixed64($stream, $this->encounter_id);
}
if ($this->pokemon_id !== null) {
$writer->writeVarint($stream, 24);
$writer->writeVarint($stream, $this->pokemon_id->value());
}
if ($this->expiration_timestamp_ms !== null) {
$writer->writeVarint($stream, 32);
$writer->writeVarint($stream, $this->expiration_timestamp_ms);
}
if ($this->latitude !== null) {
$writer->writeVarint($stream, 41);
$writer->writeDouble($stream, $this->latitude);
}
if ($this->longitude !== null) {
$writer->writeVarint($stream, 49);
$writer->writeDouble($stream, $this->longitude);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->daily_bonus_coins !== null) {
$writer->writeVarint($stream, 8);
$writer->writeVarint($stream, $this->daily_bonus_coins);
}
if ($this->daily_defender_bonus_per_pokemon !== null) {
foreach ($this->daily_defender_bonus_per_pokemon as $val) {
$writer->writeVarint($stream, 16);
$writer->writeVarint($stream, $val);
}
}
if ($this->daily_defender_bonus_max_defenders !== null) {
$writer->writeVarint($stream, 24);
$writer->writeVarint($stream, $this->daily_defender_bonus_max_defenders);
}
if ($this->daily_defender_bonus_currency !== null) {
foreach ($this->daily_defender_bonus_currency as $val) {
$writer->writeVarint($stream, 34);
$writer->writeString($stream, $val);
}
}
if ($this->min_time_between_claims_ms !== null) {
$writer->writeVarint($stream, 40);
$writer->writeVarint($stream, $this->min_time_between_claims_ms);
}
if ($this->daily_bonus_enabled !== null) {
$writer->writeVarint($stream, 48);
$writer->writeBool($stream, $this->daily_bonus_enabled);
}
if ($this->daily_defender_bonus_enabled !== null) {
$writer->writeVarint($stream, 56);
$writer->writeBool($stream, $this->daily_defender_bonus_enabled);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->max_pokemon !== null) {
$writer->writeVarint($stream, 8);
$writer->writeVarint($stream, $this->max_pokemon);
}
if ($this->max_bag_items !== null) {
$writer->writeVarint($stream, 16);
$writer->writeVarint($stream, $this->max_bag_items);
}
if ($this->base_pokemon !== null) {
$writer->writeVarint($stream, 24);
$writer->writeVarint($stream, $this->base_pokemon);
}
if ($this->base_bag_items !== null) {
$writer->writeVarint($stream, 32);
$writer->writeVarint($stream, $this->base_bag_items);
}
if ($this->base_eggs !== null) {
$writer->writeVarint($stream, 40);
$writer->writeVarint($stream, $this->base_eggs);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:protobuf-ph
项目:google-protobuf-prot
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->name_part === null) {
throw new \UnexpectedValueException('Field "\\google\\protobuf\\UninterpretedOption\\NamePart#name_part" (tag 1) is required but has no value.');
}
if ($this->is_extension === null) {
throw new \UnexpectedValueException('Field "\\google\\protobuf\\UninterpretedOption\\NamePart#is_extension" (tag 2) is required but has no value.');
}
if ($this->name_part !== null) {
$writer->writeVarint($stream, 10);
$writer->writeString($stream, $this->name_part);
}
if ($this->is_extension !== null) {
$writer->writeVarint($stream, 16);
$writer->writeBool($stream, $this->is_extension);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->active_pokemon !== null) {
$writer->writeVarint($stream, 10);
$writer->writeVarint($stream, $this->active_pokemon->serializedSize($sizeContext));
$this->active_pokemon->writeTo($context);
}
if ($this->trainer_public_profile !== null) {
$writer->writeVarint($stream, 18);
$writer->writeVarint($stream, $this->trainer_public_profile->serializedSize($sizeContext));
$this->trainer_public_profile->writeTo($context);
}
if ($this->reverse_pokemon !== null) {
foreach ($this->reverse_pokemon as $val) {
$writer->writeVarint($stream, 26);
$writer->writeVarint($stream, $val->serializedSize($sizeContext));
$val->writeTo($context);
}
}
if ($this->defeated_pokemon !== null) {
foreach ($this->defeated_pokemon as $val) {
$writer->writeVarint($stream, 34);
$writer->writeVarint($stream, $val->serializedSize($sizeContext));
$val->writeTo($context);
}
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:protobuf-ph
项目:google-protobuf-prot
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->name !== null) {
$writer->writeVarint($stream, 10);
$writer->writeString($stream, $this->name);
}
if ($this->number !== null) {
$writer->writeVarint($stream, 16);
$writer->writeVarint($stream, $this->number);
}
if ($this->options !== null) {
$writer->writeVarint($stream, 26);
$writer->writeVarint($stream, $this->options->serializedSize($sizeContext));
$this->options->writeTo($context);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->contact_settings !== null) {
$writer->writeVarint($stream, 10);
$writer->writeVarint($stream, $this->contact_settings->serializedSize($sizeContext));
$this->contact_settings->writeTo($context);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->encounter_id !== null) {
$writer->writeVarint($stream, 9);
$writer->writeFixed64($stream, $this->encounter_id);
}
if ($this->last_modified_timestamp_ms !== null) {
$writer->writeVarint($stream, 16);
$writer->writeVarint($stream, $this->last_modified_timestamp_ms);
}
if ($this->latitude !== null) {
$writer->writeVarint($stream, 25);
$writer->writeDouble($stream, $this->latitude);
}
if ($this->longitude !== null) {
$writer->writeVarint($stream, 33);
$writer->writeDouble($stream, $this->longitude);
}
if ($this->spawn_point_id !== null) {
$writer->writeVarint($stream, 42);
$writer->writeString($stream, $this->spawn_point_id);
}
if ($this->pokemon_data !== null) {
$writer->writeVarint($stream, 58);
$writer->writeVarint($stream, $this->pokemon_data->serializedSize($sizeContext));
$this->pokemon_data->writeTo($context);
}
if ($this->time_till_hidden_ms !== null) {
$writer->writeVarint($stream, 88);
$writer->writeVarint($stream, $this->time_till_hidden_ms);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->field1 !== null) {
foreach ($this->field1 as $val) {
$writer->writeVarint($stream, 10);
$writer->writeVarint($stream, $val->serializedSize($sizeContext));
$val->writeTo($context);
}
}
if ($this->timestamp_since_start !== null) {
$writer->writeVarint($stream, 16);
$writer->writeVarint($stream, $this->timestamp_since_start);
}
if ($this->field3 !== null) {
$writer->writeVarint($stream, 26);
$writer->writeString($stream, $this->field3);
}
if ($this->location_fix !== null) {
foreach ($this->location_fix as $val) {
$writer->writeVarint($stream, 34);
$writer->writeVarint($stream, $val->serializedSize($sizeContext));
$val->writeTo($context);
}
}
if ($this->gps_info !== null) {
foreach ($this->gps_info as $val) {
$writer->writeVarint($stream, 42);
$writer->writeVarint($stream, $val->serializedSize($sizeContext));
$val->writeTo($context);
}
}
if ($this->field6 !== null) {
foreach ($this->field6 as $val) {
$writer->writeVarint($stream, 50);
$writer->writeVarint($stream, $val->serializedSize($sizeContext));
$val->writeTo($context);
}
}
if ($this->sensor_info !== null) {
foreach ($this->sensor_info as $val) {
$writer->writeVarint($stream, 58);
$writer->writeVarint($stream, $val->serializedSize($sizeContext));
$val->writeTo($context);
}
}
if ($this->device_info !== null) {
$writer->writeVarint($stream, 66);
$writer->writeVarint($stream, $this->device_info->serializedSize($sizeContext));
$this->device_info->writeTo($context);
}
if ($this->activity_status !== null) {
$writer->writeVarint($stream, 74);
$writer->writeVarint($stream, $this->activity_status->serializedSize($sizeContext));
$this->activity_status->writeTo($context);
}
if ($this->location_hash1 !== null) {
$writer->writeVarint($stream, 80);
$writer->writeVarint($stream, $this->location_hash1);
}
if ($this->field11 !== null) {
$writer->writeVarint($stream, 88);
$writer->writeBool($stream, $this->field11);
}
if ($this->field12 !== null) {
$writer->writeVarint($stream, 96);
$writer->writeBool($stream, $this->field12);
}
if ($this->field13 !== null) {
$writer->writeVarint($stream, 104);
$writer->writeVarint($stream, $this->field13);
}
if ($this->field14 !== null) {
$writer->writeVarint($stream, 112);
$writer->writeVarint($stream, $this->field14);
}
if ($this->field15 !== null) {
$writer->writeVarint($stream, 122);
$writer->writeString($stream, $this->field15);
}
if ($this->field16 !== null) {
$writer->writeVarint($stream, 128);
$writer->writeVarint($stream, $this->field16);
}
if ($this->field17 !== null) {
$writer->writeVarint($stream, 138);
$writer->writeString($stream, $this->field17);
}
if ($this->field18 !== null) {
$writer->writeVarint($stream, 146);
$writer->writeString($stream, $this->field18);
}
if ($this->field19 !== null) {
$writer->writeVarint($stream, 152);
$writer->writeBool($stream, $this->field19);
//.........这里部分代码省略.........
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->egg_incubator !== null) {
foreach ($this->egg_incubator as $val) {
$writer->writeVarint($stream, 10);
$writer->writeVarint($stream, $val->serializedSize($sizeContext));
$val->writeTo($context);
}
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->result !== null) {
$writer->writeVarint($stream, 8);
$writer->writeVarint($stream, $this->result->value());
}
if ($this->battle_start_timestamp_ms !== null) {
$writer->writeVarint($stream, 16);
$writer->writeVarint($stream, $this->battle_start_timestamp_ms);
}
if ($this->battle_end_timestamp_ms !== null) {
$writer->writeVarint($stream, 24);
$writer->writeVarint($stream, $this->battle_end_timestamp_ms);
}
if ($this->battle_id !== null) {
$writer->writeVarint($stream, 34);
$writer->writeString($stream, $this->battle_id);
}
if ($this->defender !== null) {
$writer->writeVarint($stream, 42);
$writer->writeVarint($stream, $this->defender->serializedSize($sizeContext));
$this->defender->writeTo($context);
}
if ($this->battle_log !== null) {
$writer->writeVarint($stream, 50);
$writer->writeVarint($stream, $this->battle_log->serializedSize($sizeContext));
$this->battle_log->writeTo($context);
}
if ($this->attacker !== null) {
$writer->writeVarint($stream, 58);
$writer->writeVarint($stream, $this->attacker->serializedSize($sizeContext));
$this->attacker->writeTo($context);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}
作者:jaspervd
项目:pogoprotos-ph
/**
* {@inheritdoc}
*/
public function writeTo(\Protobuf\WriteContext $context)
{
$stream = $context->getStream();
$writer = $context->getWriter();
$sizeContext = $context->getComputeSizeContext();
if ($this->device_type !== null) {
$writer->writeVarint($stream, 10);
$writer->writeString($stream, $this->device_type);
}
if ($this->device_id !== null) {
$writer->writeVarint($stream, 18);
$writer->writeString($stream, $this->device_id);
}
if ($this->extensions !== null) {
$this->extensions->writeTo($context);
}
return $stream;
}