getSizeCalculator() public method

public getSizeCalculator ( ) : SizeCalculator
return Protobuf\Binary\SizeCalculator
Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->current_period_bucket !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->current_period_bucket);
     }
     if ($this->current_streak_count !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->current_streak_count);
     }
     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->fort_id !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->fort_id);
     }
     if ($this->team_color !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->team_color->value());
     }
     if ($this->pokemon_data !== null) {
         $innerSize = $this->pokemon_data->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->name !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->name);
     }
     if ($this->image_urls !== null) {
         foreach ($this->image_urls as $val) {
             $size += 1;
             $size += $calculator->computeStringSize($val);
         }
     }
     if ($this->fp !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->fp);
     }
     if ($this->stamina !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->stamina);
     }
     if ($this->max_stamina !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->max_stamina);
     }
     if ($this->type !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->type->value());
     }
     if ($this->latitude !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->longitude !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->description !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->description);
     }
     if ($this->modifiers !== null) {
         foreach ($this->modifiers as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->incense_type !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->incense_type->value());
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->fort_id !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->fort_id);
     }
     if ($this->encounter_id !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->active_pokemon_id !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->active_pokemon_id->value());
     }
     if ($this->lure_expires_timestamp_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->lure_expires_timestamp_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->result !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->result->value());
     }
     if ($this->log_entries !== null) {
         foreach ($this->log_entries as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 6
0
 /**
  * {@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->times_encountered !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->times_encountered);
     }
     if ($this->times_captured !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->times_captured);
     }
     if ($this->evolution_stone_pieces !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->evolution_stone_pieces);
     }
     if ($this->evolution_stones !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->evolution_stones);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 7
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     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->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->name_part !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->name_part);
     }
     if ($this->is_extension !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 9
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->max_pokemon !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->max_pokemon);
     }
     if ($this->max_bag_items !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->max_bag_items);
     }
     if ($this->base_pokemon !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->base_pokemon);
     }
     if ($this->base_bag_items !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->base_bag_items);
     }
     if ($this->base_eggs !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->base_eggs);
     }
     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->name !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->name);
     }
     if ($this->number !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->number);
     }
     if ($this->options !== null) {
         $innerSize = $this->options->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 11
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->active_pokemon !== null) {
         $innerSize = $this->active_pokemon->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->trainer_public_profile !== null) {
         $innerSize = $this->trainer_public_profile->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->reverse_pokemon !== null) {
         foreach ($this->reverse_pokemon as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->defeated_pokemon !== null) {
         foreach ($this->defeated_pokemon as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 12
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->activity_type !== null) {
         $innerSize = 0;
         foreach ($this->activity_type as $val) {
             $innerSize += $calculator->computeVarintSize($val->value());
         }
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->xp !== null) {
         $innerSize = 0;
         foreach ($this->xp as $val) {
             $innerSize += $calculator->computeVarintSize($val);
         }
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->candy !== null) {
         $innerSize = 0;
         foreach ($this->candy as $val) {
             $innerSize += $calculator->computeVarintSize($val);
         }
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->stardust !== null) {
         $innerSize = 0;
         foreach ($this->stardust as $val) {
             $innerSize += $calculator->computeVarintSize($val);
         }
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     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->name !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->name);
     }
     if ($this->number !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->number);
     }
     if ($this->label !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->label->value());
     }
     if ($this->type !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->type->value());
     }
     if ($this->type_name !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->type_name);
     }
     if ($this->extendee !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->extendee);
     }
     if ($this->default_value !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->default_value);
     }
     if ($this->oneof_index !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->oneof_index);
     }
     if ($this->json_name !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->json_name);
     }
     if ($this->options !== null) {
         $innerSize = $this->options->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     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->result !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->result->value());
     }
     if ($this->pokemon_data !== null) {
         $innerSize = $this->pokemon_data->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->capture_probability !== null) {
         $innerSize = $this->capture_probability->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 15
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->encounter_id !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->last_modified_timestamp_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->last_modified_timestamp_ms);
     }
     if ($this->latitude !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->longitude !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->spawn_point_id !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->spawn_point_id);
     }
     if ($this->pokemon_data !== null) {
         $innerSize = $this->pokemon_data->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->time_till_hidden_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->time_till_hidden_ms);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 16
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->daily_bonus_coins !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->daily_bonus_coins);
     }
     if ($this->daily_defender_bonus_per_pokemon !== null) {
         foreach ($this->daily_defender_bonus_per_pokemon as $val) {
             $size += 1;
             $size += $calculator->computeVarintSize($val);
         }
     }
     if ($this->daily_defender_bonus_max_defenders !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->daily_defender_bonus_max_defenders);
     }
     if ($this->daily_defender_bonus_currency !== null) {
         foreach ($this->daily_defender_bonus_currency as $val) {
             $size += 1;
             $size += $calculator->computeStringSize($val);
         }
     }
     if ($this->min_time_between_claims_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->min_time_between_claims_ms);
     }
     if ($this->daily_bonus_enabled !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->daily_defender_bonus_enabled !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 17
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->field1 !== null) {
         foreach ($this->field1 as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->timestamp_since_start !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->timestamp_since_start);
     }
     if ($this->field3 !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->field3);
     }
     if ($this->location_fix !== null) {
         foreach ($this->location_fix as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->gps_info !== null) {
         foreach ($this->gps_info as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->field6 !== null) {
         foreach ($this->field6 as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->sensor_info !== null) {
         foreach ($this->sensor_info as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->device_info !== null) {
         $innerSize = $this->device_info->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->activity_status !== null) {
         $innerSize = $this->activity_status->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->location_hash1 !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->location_hash1);
     }
     if ($this->field11 !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->field12 !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->field13 !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->field13);
     }
     if ($this->field14 !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->field14);
     }
     if ($this->field15 !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->field15);
     }
     if ($this->field16 !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->field16);
     }
     if ($this->field17 !== null) {
         $size += 2;
         $size += $calculator->computeStringSize($this->field17);
     }
     if ($this->field18 !== null) {
         $size += 2;
         $size += $calculator->computeStringSize($this->field18);
     }
     if ($this->field19 !== null) {
         $size += 2;
         $size += 1;
     }
     if ($this->location_hash2 !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->location_hash2);
     }
     if ($this->field21 !== null) {
         $size += 2;
         $size += 1;
     }
     if ($this->session_hash !== null) {
         $size += 2;
         $size += $calculator->computeByteStreamSize($this->session_hash);
     }
     if ($this->timestamp !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->timestamp);
     }
     if ($this->request_hash !== null) {
         foreach ($this->request_hash as $val) {
             $size += 2;
             $size += $calculator->computeVarintSize($val);
         }
     }
     if ($this->unknown25 !== null) {
         $size += 2;
         $size += $calculator->computeVarintSize($this->unknown25);
     }
     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->device_type !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->device_type);
     }
     if ($this->device_id !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->device_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->result !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->result->value());
     }
     if ($this->battle_start_timestamp_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->battle_start_timestamp_ms);
     }
     if ($this->battle_end_timestamp_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->battle_end_timestamp_ms);
     }
     if ($this->battle_id !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->battle_id);
     }
     if ($this->defender !== null) {
         $innerSize = $this->defender->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->battle_log !== null) {
         $innerSize = $this->battle_log->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->attacker !== null) {
         $innerSize = $this->attacker->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 20
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->sta_percent !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 21
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->energy_per_sec !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->dodge_energy_cost !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->retarget_seconds !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->enemy_attack_interval !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->attack_server_interval !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->round_duration_seconds !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->bonus_time_per_ally_seconds !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->maximum_attackers_per_battle !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->maximum_attackers_per_battle);
     }
     if ($this->same_type_attack_bonus_multiplier !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->maximum_energy !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->maximum_energy);
     }
     if ($this->energy_delta_per_health_lost !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->dodge_duration_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->dodge_duration_ms);
     }
     if ($this->minimum_player_level !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->minimum_player_level);
     }
     if ($this->swap_duration_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->swap_duration_ms);
     }
     if ($this->dodge_damage_reduction_percent !== null) {
         $size += 1;
         $size += 4;
     }
     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->name !== null) {
         $size += 1;
         $size += $calculator->computeStringSize($this->name);
     }
     if ($this->field !== null) {
         foreach ($this->field as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->extension !== null) {
         foreach ($this->extension as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->nested_type !== null) {
         foreach ($this->nested_type as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->enum_type !== null) {
         foreach ($this->enum_type as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->extension_range !== null) {
         foreach ($this->extension_range as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->oneof_decl !== null) {
         foreach ($this->oneof_decl as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->options !== null) {
         $innerSize = $this->options->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->reserved_range !== null) {
         foreach ($this->reserved_range as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->reserved_name !== null) {
         foreach ($this->reserved_name as $val) {
             $size += 1;
             $size += $calculator->computeStringSize($val);
         }
     }
     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->success !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->awarded_badges !== null) {
         foreach ($this->awarded_badges as $val) {
             $size += 1;
             $size += $calculator->computeVarintSize($val->value());
         }
     }
     if ($this->awarded_badge_levels !== null) {
         foreach ($this->awarded_badge_levels as $val) {
             $size += 1;
             $size += $calculator->computeVarintSize($val);
         }
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 24
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->next_collected_timestamp_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->next_collected_timestamp_ms);
     }
     if ($this->next_defender_bonus_collect_timestamp_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->next_defender_bonus_collect_timestamp_ms);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 25
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->buckets_per_day !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->buckets_per_day);
     }
     if ($this->streak_length !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->streak_length);
     }
     if ($this->bonus_multiplier !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->streak_bonus_multiplier !== null) {
         $size += 1;
         $size += 4;
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 26
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->gym_state !== null) {
         $innerSize = $this->gym_state->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->attackers !== null) {
         foreach ($this->attackers as $val) {
             $innerSize = $val->serializedSize($context);
             $size += 1;
             $size += $innerSize;
             $size += $calculator->computeVarintSize($innerSize);
         }
     }
     if ($this->player_experience_awarded !== null) {
         foreach ($this->player_experience_awarded as $val) {
             $size += 1;
             $size += $calculator->computeVarintSize($val);
         }
     }
     if ($this->next_defender_pokemon_id !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->next_defender_pokemon_id);
     }
     if ($this->gym_points_delta !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->gym_points_delta);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 27
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->start_time_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->start_time_ms);
     }
     if ($this->unknown_status !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->walking !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->running !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->stationary !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->automotive !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->tilting !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->cycling !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->status !== null) {
         $size += 1;
         $size += $calculator->computeByteStreamSize($this->status);
     }
     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->success !== null) {
         $size += 1;
         $size += 1;
     }
     if ($this->family_candy_id !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->family_candy_id->value());
     }
     if ($this->candy_earned_count !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->candy_earned_count);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 29
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->status !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->status->value());
     }
     if ($this->player_data !== null) {
         $innerSize = $this->player_data->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }
Ejemplo n.º 30
0
 /**
  * {@inheritdoc}
  */
 public function serializedSize(\Protobuf\ComputeSizeContext $context)
 {
     $calculator = $context->getSizeCalculator();
     $size = 0;
     if ($this->type !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->type->value());
     }
     if ($this->action_start_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->action_start_ms);
     }
     if ($this->duration_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->duration_ms);
     }
     if ($this->energy_delta !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->energy_delta);
     }
     if ($this->attacker_index !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->attacker_index);
     }
     if ($this->target_index !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->target_index);
     }
     if ($this->active_pokemon_id !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->player_joined !== null) {
         $innerSize = $this->player_joined->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->battle_results !== null) {
         $innerSize = $this->battle_results->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->damage_windows_start_timestamp_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->damage_windows_start_timestamp_ms);
     }
     if ($this->damage_windows_end_timestamp_ms !== null) {
         $size += 1;
         $size += $calculator->computeVarintSize($this->damage_windows_end_timestamp_ms);
     }
     if ($this->player_left !== null) {
         $innerSize = $this->player_left->serializedSize($context);
         $size += 1;
         $size += $innerSize;
         $size += $calculator->computeVarintSize($innerSize);
     }
     if ($this->target_pokemon_id !== null) {
         $size += 1;
         $size += 8;
     }
     if ($this->extensions !== null) {
         $size += $this->extensions->serializedSize($context);
     }
     return $size;
 }