public void MergeFrom(QuestReward other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Type != 0)
     {
         Type = other.Type;
     }
     if (other.Exp != 0)
     {
         Exp = other.Exp;
     }
     if (other.item_ != null)
     {
         if (item_ == null)
         {
             item_ = new global::POGOProtos.Data.Quests.QuestReward.Types.ItemReward();
         }
         Item.MergeFrom(other.Item);
     }
     if (other.Stardust != 0)
     {
         Stardust = other.Stardust;
     }
     if (other.candy_ != null)
     {
         if (candy_ == null)
         {
             candy_ = new global::POGOProtos.Data.Quests.QuestReward.Types.PokemonCandyReward();
         }
         Candy.MergeFrom(other.Candy);
     }
     if (other.AvatarTemplateId.Length != 0)
     {
         AvatarTemplateId = other.AvatarTemplateId;
     }
     if (other.QuestTemplateId.Length != 0)
     {
         QuestTemplateId = other.QuestTemplateId;
     }
     if (other.pokemonEncounter_ != null)
     {
         if (pokemonEncounter_ == null)
         {
             pokemonEncounter_ = new global::POGOProtos.Data.Quests.QuestReward.Types.PokemonEncounterReward();
         }
         PokemonEncounter.MergeFrom(other.PokemonEncounter);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 8: {
                    type_ = (global::POGOProtos.Data.Quests.QuestReward.Types.Type)input.ReadEnum();
                    break;
                }

                case 16: {
                    Exp = input.ReadInt32();
                    break;
                }

                case 26: {
                    if (item_ == null)
                    {
                        item_ = new global::POGOProtos.Data.Quests.QuestReward.Types.ItemReward();
                    }
                    input.ReadMessage(item_);
                    break;
                }

                case 32: {
                    Stardust = input.ReadInt32();
                    break;
                }

                case 42: {
                    if (candy_ == null)
                    {
                        candy_ = new global::POGOProtos.Data.Quests.QuestReward.Types.PokemonCandyReward();
                    }
                    input.ReadMessage(candy_);
                    break;
                }

                case 50: {
                    AvatarTemplateId = input.ReadString();
                    break;
                }

                case 58: {
                    QuestTemplateId = input.ReadString();
                    break;
                }

                case 66: {
                    if (pokemonEncounter_ == null)
                    {
                        pokemonEncounter_ = new global::POGOProtos.Data.Quests.QuestReward.Types.PokemonEncounterReward();
                    }
                    input.ReadMessage(pokemonEncounter_);
                    break;
                }
                }
            }
        }