writeTo() public method

public writeTo ( WriteContext $context )
$context Protobuf\WriteContext
Exemplo n.º 1
0
 /**
  * {@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;
 }
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->platform !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->platform->value());
     }
     if ($this->device_manufacturer !== null) {
         $writer->writeVarint($stream, 18);
         $writer->writeString($stream, $this->device_manufacturer);
     }
     if ($this->device_model !== null) {
         $writer->writeVarint($stream, 26);
         $writer->writeString($stream, $this->device_model);
     }
     if ($this->locale !== null) {
         $writer->writeVarint($stream, 34);
         $writer->writeString($stream, $this->locale);
     }
     if ($this->app_version !== null) {
         $writer->writeVarint($stream, 40);
         $writer->writeVarint($stream, $this->app_version);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->success !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeBool($stream, $this->success);
     }
     if ($this->awarded_badges !== null) {
         foreach ($this->awarded_badges as $val) {
             $writer->writeVarint($stream, 16);
             $writer->writeVarint($stream, $val->value());
         }
     }
     if ($this->awarded_badge_levels !== null) {
         foreach ($this->awarded_badge_levels as $val) {
             $writer->writeVarint($stream, 24);
             $writer->writeVarint($stream, $val);
         }
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
Exemplo n.º 4
0
 /**
  * {@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;
 }
Exemplo n.º 5
0
 /**
  * {@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;
 }
 /**
  * {@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;
 }
 /**
  * {@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->pokemon_id !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->pokemon_id->value());
     }
     if ($this->combat_points !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeVarint($stream, $this->combat_points);
     }
     if ($this->pokemon_data_id !== null) {
         $writer->writeVarint($stream, 33);
         $writer->writeFixed64($stream, $this->pokemon_data_id);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
 /**
  * {@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->start_time !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->start_time);
     }
     if ($this->badges !== null) {
         foreach ($this->badges as $val) {
             $writer->writeVarint($stream, 26);
             $writer->writeVarint($stream, $val->serializedSize($sizeContext));
             $val->writeTo($context);
         }
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
Exemplo n.º 9
0
 /**
  * {@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->distance_in_meters !== null) {
         $writer->writeVarint($stream, 21);
         $writer->writeFloat($stream, $this->distance_in_meters);
     }
     if ($this->encounter_id !== null) {
         $writer->writeVarint($stream, 25);
         $writer->writeFixed64($stream, $this->encounter_id);
     }
     if ($this->fort_id !== null) {
         $writer->writeVarint($stream, 34);
         $writer->writeString($stream, $this->fort_id);
     }
     if ($this->fort_image_url !== null) {
         $writer->writeVarint($stream, 42);
         $writer->writeString($stream, $this->fort_image_url);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->codename !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeString($stream, $this->codename);
     }
     if ($this->user_message !== null) {
         $writer->writeVarint($stream, 18);
         $writer->writeString($stream, $this->user_message);
     }
     if ($this->is_assignable !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeBool($stream, $this->is_assignable);
     }
     if ($this->status !== null) {
         $writer->writeVarint($stream, 32);
         $writer->writeVarint($stream, $this->status->value());
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
Exemplo n.º 11
0
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->interaction_range_meters !== null) {
         $writer->writeVarint($stream, 9);
         $writer->writeDouble($stream, $this->interaction_range_meters);
     }
     if ($this->max_total_deployed_pokemon !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->max_total_deployed_pokemon);
     }
     if ($this->max_player_deployed_pokemon !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeVarint($stream, $this->max_player_deployed_pokemon);
     }
     if ($this->deploy_stamina_multiplier !== null) {
         $writer->writeVarint($stream, 33);
         $writer->writeDouble($stream, $this->deploy_stamina_multiplier);
     }
     if ($this->deploy_attack_multiplier !== null) {
         $writer->writeVarint($stream, 41);
         $writer->writeDouble($stream, $this->deploy_attack_multiplier);
     }
     if ($this->far_interaction_range_meters !== null) {
         $writer->writeVarint($stream, 49);
         $writer->writeDouble($stream, $this->far_interaction_range_meters);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
Exemplo n.º 12
0
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->disk_radius_m !== null) {
         $writer->writeVarint($stream, 13);
         $writer->writeFloat($stream, $this->disk_radius_m);
     }
     if ($this->cylinder_radius_m !== null) {
         $writer->writeVarint($stream, 21);
         $writer->writeFloat($stream, $this->cylinder_radius_m);
     }
     if ($this->cylinder_height_m !== null) {
         $writer->writeVarint($stream, 29);
         $writer->writeFloat($stream, $this->cylinder_height_m);
     }
     if ($this->cylinder_ground_m !== null) {
         $writer->writeVarint($stream, 37);
         $writer->writeFloat($stream, $this->cylinder_ground_m);
     }
     if ($this->shoulder_mode_scale !== null) {
         $writer->writeVarint($stream, 45);
         $writer->writeFloat($stream, $this->shoulder_mode_scale);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
 /**
  * {@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->value !== null) {
         foreach ($this->value as $val) {
             $writer->writeVarint($stream, 18);
             $writer->writeVarint($stream, $val->serializedSize($sizeContext));
             $val->writeTo($context);
         }
     }
     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;
 }
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->equip_badge_cooldown_ms !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->equip_badge_cooldown_ms);
     }
     if ($this->catch_probability_bonus !== null) {
         foreach ($this->catch_probability_bonus as $val) {
             $writer->writeVarint($stream, 21);
             $writer->writeFloat($stream, $val);
         }
     }
     if ($this->flee_probability_bonus !== null) {
         foreach ($this->flee_probability_bonus as $val) {
             $writer->writeVarint($stream, 29);
             $writer->writeFloat($stream, $val);
         }
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->gym_state !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeVarint($stream, $this->gym_state->serializedSize($sizeContext));
         $this->gym_state->writeTo($context);
     }
     if ($this->name !== null) {
         $writer->writeVarint($stream, 18);
         $writer->writeString($stream, $this->name);
     }
     if ($this->urls !== null) {
         foreach ($this->urls as $val) {
             $writer->writeVarint($stream, 26);
             $writer->writeString($stream, $val);
         }
     }
     if ($this->result !== null) {
         $writer->writeVarint($stream, 32);
         $writer->writeVarint($stream, $this->result->value());
     }
     if ($this->description !== null) {
         $writer->writeVarint($stream, 42);
         $writer->writeString($stream, $this->description);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
Exemplo n.º 16
0
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->pokemon_data !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeVarint($stream, $this->pokemon_data->serializedSize($sizeContext));
         $this->pokemon_data->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->training_pokemon !== null) {
         $writer->writeVarint($stream, 26);
         $writer->writeVarint($stream, $this->training_pokemon->serializedSize($sizeContext));
         $this->training_pokemon->writeTo($context);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
Exemplo n.º 17
0
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->badge_type !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->badge_type->value());
     }
     if ($this->badge_rank !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->badge_rank);
     }
     if ($this->targets !== null) {
         foreach ($this->targets as $val) {
             $writer->writeVarint($stream, 24);
             $writer->writeVarint($stream, $val);
         }
     }
     if ($this->capture_reward !== null) {
         foreach ($this->capture_reward 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;
 }
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->status !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->status->value());
     }
     if ($this->items !== null) {
         foreach ($this->items as $val) {
             $writer->writeVarint($stream, 18);
             $writer->writeVarint($stream, $val->serializedSize($sizeContext));
             $val->writeTo($context);
         }
     }
     if ($this->player_currencies !== null) {
         foreach ($this->player_currencies as $val) {
             $writer->writeVarint($stream, 26);
             $writer->writeVarint($stream, $val->serializedSize($sizeContext));
             $val->writeTo($context);
         }
     }
     if ($this->unknown4 !== null) {
         $writer->writeVarint($stream, 34);
         $writer->writeString($stream, $this->unknown4);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
 /**
  * {@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->currency_type !== null) {
         foreach ($this->currency_type as $val) {
             $writer->writeVarint($stream, 18);
             $writer->writeString($stream, $val);
         }
     }
     if ($this->currency_awarded !== null) {
         foreach ($this->currency_awarded as $val) {
             $writer->writeVarint($stream, 24);
             $writer->writeVarint($stream, $val);
         }
     }
     if ($this->defenders_count !== null) {
         $writer->writeVarint($stream, 32);
         $writer->writeVarint($stream, $this->defenders_count);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->file_to_generate !== null) {
         foreach ($this->file_to_generate as $val) {
             $writer->writeVarint($stream, 10);
             $writer->writeString($stream, $val);
         }
     }
     if ($this->parameter !== null) {
         $writer->writeVarint($stream, 18);
         $writer->writeString($stream, $this->parameter);
     }
     if ($this->proto_file !== null) {
         foreach ($this->proto_file as $val) {
             $writer->writeVarint($stream, 122);
             $writer->writeVarint($stream, $val->serializedSize($sizeContext));
             $val->writeTo($context);
         }
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
 /**
  * {@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->items_awarded !== null) {
         foreach ($this->items_awarded as $val) {
             $writer->writeVarint($stream, 18);
             $writer->writeVarint($stream, $val->serializedSize($sizeContext));
             $val->writeTo($context);
         }
     }
     if ($this->items_unlocked !== null) {
         foreach ($this->items_unlocked as $val) {
             $writer->writeVarint($stream, 32);
             $writer->writeVarint($stream, $val->value());
         }
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
Exemplo n.º 22
0
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->asset_id !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeString($stream, $this->asset_id);
     }
     if ($this->url !== null) {
         $writer->writeVarint($stream, 18);
         $writer->writeString($stream, $this->url);
     }
     if ($this->size !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeVarint($stream, $this->size);
     }
     if ($this->checksum !== null) {
         $writer->writeVarint($stream, 37);
         $writer->writeFixed32($stream, $this->checksum);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
Exemplo n.º 23
0
 /**
  * {@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;
 }
Exemplo n.º 24
0
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->badge_type !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->badge_type->value());
     }
     if ($this->rank !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->rank);
     }
     if ($this->start_value !== null) {
         $writer->writeVarint($stream, 24);
         $writer->writeVarint($stream, $this->start_value);
     }
     if ($this->end_value !== null) {
         $writer->writeVarint($stream, 32);
         $writer->writeVarint($stream, $this->end_value);
     }
     if ($this->current_value !== null) {
         $writer->writeVarint($stream, 41);
         $writer->writeDouble($stream, $this->current_value);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
Exemplo n.º 25
0
 /**
  * {@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;
 }
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->modifier_type !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->modifier_type->value());
     }
     if ($this->fort_id !== null) {
         $writer->writeVarint($stream, 18);
         $writer->writeString($stream, $this->fort_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;
 }
Exemplo n.º 27
0
 /**
  * {@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;
 }
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->gym_id !== null) {
         $writer->writeVarint($stream, 10);
         $writer->writeString($stream, $this->gym_id);
     }
     if ($this->attacking_pokemon_ids !== null) {
         foreach ($this->attacking_pokemon_ids as $val) {
             $writer->writeVarint($stream, 17);
             $writer->writeFixed64($stream, $val);
         }
     }
     if ($this->defending_pokemon_id !== null) {
         $writer->writeVarint($stream, 25);
         $writer->writeFixed64($stream, $this->defending_pokemon_id);
     }
     if ($this->player_latitude !== null) {
         $writer->writeVarint($stream, 33);
         $writer->writeDouble($stream, $this->player_latitude);
     }
     if ($this->player_longitude !== null) {
         $writer->writeVarint($stream, 41);
         $writer->writeDouble($stream, $this->player_longitude);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
Exemplo n.º 29
0
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->buckets_per_day !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->buckets_per_day);
     }
     if ($this->streak_length !== null) {
         $writer->writeVarint($stream, 16);
         $writer->writeVarint($stream, $this->streak_length);
     }
     if ($this->bonus_multiplier !== null) {
         $writer->writeVarint($stream, 29);
         $writer->writeFloat($stream, $this->bonus_multiplier);
     }
     if ($this->streak_bonus_multiplier !== null) {
         $writer->writeVarint($stream, 37);
         $writer->writeFloat($stream, $this->streak_bonus_multiplier);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }
Exemplo n.º 30
0
 /**
  * {@inheritdoc}
  */
 public function writeTo(\Protobuf\WriteContext $context)
 {
     $stream = $context->getStream();
     $writer = $context->getWriter();
     $sizeContext = $context->getComputeSizeContext();
     if ($this->item_effect !== null) {
         $writer->writeVarint($stream, 8);
         $writer->writeVarint($stream, $this->item_effect->value());
     }
     if ($this->capture_multi !== null) {
         $writer->writeVarint($stream, 21);
         $writer->writeFloat($stream, $this->capture_multi);
     }
     if ($this->capture_multi_effect !== null) {
         $writer->writeVarint($stream, 29);
         $writer->writeFloat($stream, $this->capture_multi_effect);
     }
     if ($this->item_effect_mod !== null) {
         $writer->writeVarint($stream, 37);
         $writer->writeFloat($stream, $this->item_effect_mod);
     }
     if ($this->extensions !== null) {
         $this->extensions->writeTo($context);
     }
     return $stream;
 }