/**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'GetPlayerProfileResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Responses.GetPlayerProfileResponse.Result']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'start_time', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'badges', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Data.PlayerBadge'])]]);
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'BuyItemPokeCoinsResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Platform.Responses.BuyItemPokeCoinsResponse.Status'])]]);
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'UseIncenseMessage', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'incense_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Inventory.Item.ItemId'])]]);
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'CheckAwardedBadgesResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'success', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_BOOL(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'awarded_badges', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Enums.BadgeType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'awarded_badge_levels', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()])]]);
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'SfidaActionLogResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Responses.SfidaActionLogResponse.Result']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'log_entries', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Data.Logs.ActionLogEntry'])]]);
 }
Ejemplo n.º 6
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'PokedexEntry', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'pokemon_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'times_encountered', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'times_captured', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'evolution_stone_pieces', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'evolution_stones', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'InventoryUpgradeAttributes', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'additional_storage', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'upgrade_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Inventory.InventoryUpgradeType'])]]);
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'IncenseEncounterResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Responses.IncenseEncounterResponse.Result']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'pokemon_data', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.PokemonData']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'capture_probability', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.Capture.CaptureProbability'])]]);
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'FieldDescriptorProto', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'name', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'number', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'label', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.google.protobuf.FieldDescriptorProto.Label']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.google.protobuf.FieldDescriptorProto.Type']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 6, 'name' => 'type_name', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'extendee', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 7, 'name' => 'default_value', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 9, 'name' => 'oneof_index', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 10, 'name' => 'json_name', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 8, 'name' => 'options', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.google.protobuf.FieldOptions'])]]);
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'LevelUpRewardsResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Responses.LevelUpRewardsResponse.Result']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'items_awarded', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Inventory.Item.ItemAward']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'items_unlocked', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Inventory.Item.ItemId'])]]);
 }
Ejemplo n.º 11
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'BattleAction', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.Battle.BattleActionType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'action_start_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'duration_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'energy_delta', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 6, 'name' => 'attacker_index', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 7, 'name' => 'target_index', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 8, 'name' => 'active_pokemon_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FIXED64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 9, 'name' => 'player_joined', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.Battle.BattleParticipant']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 10, 'name' => 'battle_results', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.Battle.BattleResults']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 11, 'name' => 'damage_windows_start_timestamp_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 12, 'name' => 'damage_windows_end_timestamp_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 13, 'name' => 'player_left', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.Battle.BattleParticipant']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 14, 'name' => 'target_pokemon_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FIXED64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'CatchPokemonLogEntry', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.Logs.CatchPokemonLogEntry.Result']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'pokemon_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'combat_points', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'pokemon_data_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FIXED64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
Ejemplo n.º 13
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'PokemonSettings', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'pokemon_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'model_scale', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'type_2', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 6, 'name' => 'camera', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Settings.Master.Pokemon.CameraAttributes']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 7, 'name' => 'encounter', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Settings.Master.Pokemon.EncounterAttributes']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 8, 'name' => 'stats', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Settings.Master.Pokemon.StatsAttributes']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 9, 'name' => 'quick_moves', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Enums.PokemonMove']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 10, 'name' => 'cinematic_moves', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Enums.PokemonMove']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 11, 'name' => 'animation_time', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 12, 'name' => 'evolution_ids', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Enums.PokemonId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 13, 'name' => 'evolution_pips', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 14, 'name' => 'rarity', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonRarity']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 15, 'name' => 'pokedex_height_m', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 16, 'name' => 'pokedex_weight_kg', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 17, 'name' => 'parent_pokemon_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 18, 'name' => 'height_std_dev', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 19, 'name' => 'weight_std_dev', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 20, 'name' => 'km_distance_to_hatch', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 21, 'name' => 'family_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonFamilyId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 22, 'name' => 'candy_to_evolve', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 23, 'name' => 'km_buddy_distance', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 24, 'name' => 'buddy_size', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Settings.Master.PokemonSettings.BuddySize']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 25, 'name' => 'model_height', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FLOAT(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'CollectDailyDefenderBonusResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Responses.CollectDailyDefenderBonusResponse.Result']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'currency_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'currency_awarded', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'defenders_count', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
Ejemplo n.º 15
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'ItemAward', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'item_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Inventory.Item.ItemId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'item_count', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
Ejemplo n.º 16
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'CaptureAward', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'activity_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Enums.ActivityType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'xp', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'candy', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'stardust', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()])]]);
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'GetBuddyWalkedResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'success', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_BOOL(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'family_candy_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonFamilyId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'candy_earned_count', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
Ejemplo n.º 18
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'QuestSettings', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'quest_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.QuestType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'daily_quest', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Settings.Master.Quest.DailyQuestSettings'])]]);
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'StartGymBattleResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Responses.StartGymBattleResponse.Result']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'battle_start_timestamp_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'battle_end_timestamp_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'battle_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'defender', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.Battle.BattleParticipant']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 6, 'name' => 'battle_log', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.Battle.BattleLog']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 7, 'name' => 'attacker', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.Battle.BattleParticipant'])]]);
 }
Ejemplo n.º 20
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'UseItemGymResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Responses.UseItemGymResponse.Result']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'updated_gp', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
Ejemplo n.º 21
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'FortLureInfo', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'fort_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'encounter_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FIXED64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'active_pokemon_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'lure_expires_timestamp_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
 /**
  * @param \Protobuf\Compiler\Entity             $entity
  * @param \google\protobuf\FieldDescriptorProto $field
  *
  * @return string[]
  */
 public function generateFieldReadStatement(Entity $entity, FieldDescriptorProto $field)
 {
     $body = [];
     $reference = null;
     $type = $field->getType();
     $name = $field->getName();
     $rule = $field->getLabel();
     $tag = $field->getNumber();
     $options = $field->getOptions();
     $isPack = $options ? $options->getPacked() : false;
     $variable = $this->targetVar ?: '$this->' . $name;
     $breakSttm = $this->getBreakStatement($variable);
     if ($field->hasTypeName()) {
         $typeName = $field->getTypeName();
         $typeEntity = $this->getEntity($typeName);
         $reference = $typeEntity->getNamespacedName();
     }
     if (!$isPack) {
         $body[] = sprintf('\\Protobuf\\WireFormat::assertWireType($wire, %s);', $type->value());
         $body[] = null;
     }
     if ($rule === Label::LABEL_REPEATED() && $isPack) {
         $readSttm = $type === Type::TYPE_ENUM() ? $reference . '::valueOf(' . $this->generateReadScalarStatement($type->value()) . ')' : $this->generateReadScalarStatement($type->value());
         $body[] = '$innerSize  = $reader->readVarint($stream);';
         $body[] = '$innerLimit = $stream->tell() + $innerSize;';
         $body[] = null;
         $body[] = 'if (' . $variable . ' === null) {';
         $body[] = '    ' . $variable . ' = new ' . $this->getCollectionClassName($field) . '();';
         $body[] = '}';
         $body[] = null;
         $body[] = 'while ($stream->tell() < $innerLimit) {';
         $body[] = '    ' . $variable . '->add(' . $readSttm . ');';
         $body[] = '}';
         $body[] = null;
         $body[] = $breakSttm;
         return $body;
     }
     if ($type === Type::TYPE_MESSAGE() && $rule === Label::LABEL_REPEATED()) {
         $body[] = '$innerSize    = $reader->readVarint($stream);';
         $body[] = '$innerMessage = new ' . $reference . '();';
         $body[] = null;
         $body[] = 'if (' . $variable . ' === null) {';
         $body[] = '    ' . $variable . ' = new \\Protobuf\\MessageCollection();';
         $body[] = '}';
         $body[] = null;
         $body[] = $variable . '->add($innerMessage);';
         $body[] = null;
         $body[] = '$context->setLength($innerSize);';
         $body[] = '$innerMessage->readFrom($context);';
         $body[] = '$context->setLength($length);';
         $body[] = null;
         $body[] = $breakSttm;
         return $body;
     }
     if ($type === Type::TYPE_ENUM() && $rule === LABEL::LABEL_REPEATED()) {
         $body[] = 'if (' . $variable . ' === null) {';
         $body[] = '    ' . $variable . ' = new ' . $this->getCollectionClassName($field) . '();';
         $body[] = '}';
         $body[] = null;
         $body[] = $variable . '->add(' . $reference . '::valueOf(' . $this->generateReadScalarStatement($type->value()) . '));';
         $body[] = null;
         $body[] = $breakSttm;
         return $body;
     }
     if ($type === Type::TYPE_MESSAGE()) {
         $body[] = '$innerSize    = $reader->readVarint($stream);';
         $body[] = '$innerMessage = new ' . $reference . '();';
         $body[] = null;
         $body[] = $variable . ' = $innerMessage;';
         $body[] = null;
         $body[] = '$context->setLength($innerSize);';
         $body[] = '$innerMessage->readFrom($context);';
         $body[] = '$context->setLength($length);';
         $body[] = null;
         $body[] = $breakSttm;
         return $body;
     }
     if ($type === Type::TYPE_ENUM()) {
         $body[] = $variable . ' = ' . $reference . '::valueOf(' . $this->generateReadScalarStatement($type->value()) . ');';
         $body[] = null;
         $body[] = $breakSttm;
         return $body;
     }
     if ($rule !== LABEL::LABEL_REPEATED()) {
         $body[] = $variable . ' = ' . $this->generateReadScalarStatement($type->value()) . ';';
         $body[] = null;
         $body[] = $breakSttm;
         return $body;
     }
     $body[] = 'if (' . $variable . ' === null) {';
     $body[] = '    ' . $variable . ' = new ' . $this->getCollectionClassName($field) . '();';
     $body[] = '}';
     $body[] = null;
     $body[] = $variable . '->add(' . $this->generateReadScalarStatement($type->value()) . ');';
     $body[] = null;
     $body[] = $breakSttm;
     return $body;
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'CollectDailyBonusResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'result', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Responses.CollectDailyBonusResponse.Result'])]]);
 }
Ejemplo n.º 24
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'Candy', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'family_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonFamilyId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'candy', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'FortDetailsResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'fort_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'team_color', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.TeamColor']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'pokemon_data', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.PokemonData']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'name', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'image_urls', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 6, 'name' => 'fp', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 7, 'name' => 'stamina', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 8, 'name' => 'max_stamina', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 9, 'name' => 'type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Map.Fort.FortType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 10, 'name' => 'latitude', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_DOUBLE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 11, 'name' => 'longitude', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_DOUBLE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 12, 'name' => 'description', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 13, 'name' => 'modifiers', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Map.Fort.FortModifier'])]]);
 }
Ejemplo n.º 26
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'MapPokemon', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'spawn_point_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_STRING(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'encounter_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_FIXED64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'pokemon_id', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.PokemonId']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'expiration_timestamp_ms', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT64(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 5, 'name' => 'latitude', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_DOUBLE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 6, 'name' => 'longitude', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_DOUBLE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
 /**
  * @param \Protobuf\Compiler\Entity             $entity
  * @param \google\protobuf\FieldDescriptorProto $field
  *
  * @return string[]
  */
 public function generateFieldWriteStatement(Entity $entity, FieldDescriptorProto $field)
 {
     $body = [];
     $name = $field->getName();
     $type = $field->getType();
     $rule = $field->getLabel();
     $tag = $field->getNumber();
     $options = $field->getOptions();
     $variable = $this->targetVar ?: '$this->' . $name;
     $isPack = $options ? $options->getPacked() : false;
     $wire = $isPack ? WireFormat::WIRE_LENGTH : WireFormat::getWireType($type->value(), null);
     $key = WireFormat::getFieldKey($tag, $wire);
     if ($rule === Label::LABEL_REPEATED() && $isPack) {
         $itemValSttm = $type === Type::TYPE_ENUM() ? '$val->value()' : '$val';
         $body[] = '$innerSize   = 0;';
         $body[] = '$calculator  = $sizeContext->getSizeCalculator();';
         $body[] = null;
         $body[] = 'foreach (' . $variable . ' as $val) {';
         $body[] = '    $innerSize += ' . $this->generateValueSizeStatement($type->value(), $itemValSttm) . ';';
         $body[] = '}';
         $body[] = null;
         $body[] = '$writer->writeVarint($stream, ' . $key . ');';
         $body[] = '$writer->writeVarint($stream, $innerSize);';
         $body[] = null;
         $body[] = 'foreach (' . $variable . ' as $val) {';
         $body[] = '    ' . $this->generateWriteScalarStatement($type->value(), $itemValSttm) . ';';
         $body[] = '}';
         return $body;
     }
     if ($type === Type::TYPE_MESSAGE() && $rule === Label::LABEL_REPEATED()) {
         $body[] = 'foreach (' . $variable . ' as $val) {';
         $body[] = '    $writer->writeVarint($stream, ' . $key . ');';
         $body[] = '    $writer->writeVarint($stream, $val->serializedSize($sizeContext));';
         $body[] = '    $val->writeTo($context);';
         $body[] = '}';
         return $body;
     }
     if ($type === Type::TYPE_ENUM() && $rule === LABEL::LABEL_REPEATED()) {
         $body[] = 'foreach (' . $variable . ' as $val) {';
         $body[] = '    $writer->writeVarint($stream, ' . $key . ');';
         $body[] = '    ' . $this->generateWriteScalarStatement($type->value(), '$val->value()') . ';';
         $body[] = '}';
         return $body;
     }
     if ($rule === Label::LABEL_REPEATED()) {
         $body[] = 'foreach (' . $variable . ' as $val) {';
         $body[] = '    $writer->writeVarint($stream, ' . $key . ');';
         $body[] = '    ' . $this->generateWriteScalarStatement($type->value(), '$val') . ';';
         $body[] = '}';
         return $body;
     }
     if ($type === Type::TYPE_ENUM()) {
         $body[] = sprintf('$writer->writeVarint($stream, %s);', $key);
         $body[] = $this->generateWriteScalarStatement($type->value(), $variable . '->value()') . ';';
         return $body;
     }
     if ($type !== Type::TYPE_MESSAGE()) {
         $body[] = sprintf('$writer->writeVarint($stream, %s);', $key);
         $body[] = $this->generateWriteScalarStatement($type->value(), $variable) . ';';
         return $body;
     }
     $body[] = '$writer->writeVarint($stream, ' . $key . ');';
     $body[] = '$writer->writeVarint($stream, ' . $variable . '->serializedSize($sizeContext));';
     $body[] = $variable . '->writeTo($context);';
     return $body;
 }
Ejemplo n.º 28
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'Request', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'request_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Requests.RequestType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'request_message', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_BYTES(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()])]]);
 }
Ejemplo n.º 29
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'SetAvatarResponse', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'status', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Networking.Responses.SetAvatarResponse.Status']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'player_data', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Data.PlayerData'])]]);
 }
Ejemplo n.º 30
0
 /**
  * {@inheritdoc}
  */
 public static function descriptor()
 {
     return \google\protobuf\DescriptorProto::fromArray(['name' => 'BadgeSettings', 'field' => [\google\protobuf\FieldDescriptorProto::fromArray(['number' => 1, 'name' => 'badge_type', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_ENUM(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL(), 'type_name' => '.POGOProtos.Enums.BadgeType']), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 2, 'name' => 'badge_rank', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_OPTIONAL()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 3, 'name' => 'targets', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_INT32(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED()]), \google\protobuf\FieldDescriptorProto::fromArray(['number' => 4, 'name' => 'capture_reward', 'type' => \google\protobuf\FieldDescriptorProto\Type::TYPE_MESSAGE(), 'label' => \google\protobuf\FieldDescriptorProto\Label::LABEL_REPEATED(), 'type_name' => '.POGOProtos.Data.Badge.BadgeCaptureReward'])]]);
 }