syntax = "proto3";
package POGOProtos.Inventory;

import public "POGOProtos.Inventory.Item.proto";
import public "POGOProtos.Enums.proto";
import public "POGOProtos.Data.Avatar.proto";
import public "POGOProtos.Data.proto";
import public "POGOProtos.Data.Player.proto";
import public "POGOProtos.Data.Quests.proto";

message AppliedItem {
	.POGOProtos.Inventory.Item.ItemId item_id = 1;
	.POGOProtos.Inventory.Item.ItemType item_type = 2;
	int64 expire_ms = 3;
	int64 applied_ms = 4;
}
message AppliedItems {
	repeated .POGOProtos.Inventory.AppliedItem item = 4;
}
message Candy {
	.POGOProtos.Enums.PokemonFamilyId family_id = 1;
	int32 candy = 2;
}
message EggIncubator {
	string id = 1;
	.POGOProtos.Inventory.Item.ItemId item_id = 2;
	.POGOProtos.Inventory.EggIncubatorType incubator_type = 3;
	int32 uses_remaining = 4;
	uint64 pokemon_id = 5;  // TODO: Check if is PokemonType
	double start_km_walked = 6;
	double target_km_walked = 7;
}
message EggIncubators {
	repeated .POGOProtos.Inventory.EggIncubator egg_incubator = 1;
}
enum EggIncubatorType {
	INCUBATOR_UNSET = 0;
	INCUBATOR_DISTANCE = 1;
}
message InventoryDelta {
	int64 original_timestamp_ms = 1;
	int64 new_timestamp_ms = 2;
	repeated .POGOProtos.Inventory.InventoryItem inventory_items = 3;
}
message InventoryItem {
	int64 modified_timestamp_ms = 1;
	DeletedItem deleted_item = 2;
	.POGOProtos.Inventory.InventoryItemData inventory_item_data = 3;

	message DeletedItem {
		fixed64 pokemon_id = 1;
	}
}
message InventoryItemData {
	.POGOProtos.Data.PokemonData pokemon_data = 1;
	.POGOProtos.Inventory.Item.ItemData item = 2;
	.POGOProtos.Data.PokedexEntry pokedex_entry = 3;
	.POGOProtos.Data.Player.PlayerStats player_stats = 4;
	.POGOProtos.Data.Player.PlayerCurrency player_currency = 5;
	.POGOProtos.Data.Player.PlayerCamera player_camera = 6;
	.POGOProtos.Inventory.InventoryUpgrades inventory_upgrades = 7;
	.POGOProtos.Inventory.AppliedItems applied_items = 8;
	.POGOProtos.Inventory.EggIncubators egg_incubators = 9;
	.POGOProtos.Inventory.Candy candy = 10;
	.POGOProtos.Data.Quests.Quest quest = 11;
	.POGOProtos.Data.Avatar.AvatarItem avatar_item = 12;
}
message InventoryKey {
	fixed64 pokemon_id = 1;
	.POGOProtos.Inventory.Item.ItemId item = 2;
	int32 pokedex_entry_id = 3;
	bool player_stats = 4;
	bool player_currency = 5;
	bool player_camera = 6;
	bool inventory_upgrades = 7;
	bool applied_items = 8;
	bool egg_incubators = 9;
	.POGOProtos.Enums.PokemonFamilyId pokemon_family_id = 10;
	.POGOProtos.Enums.QuestType quest_type = 11;
	string avatar_template_id = 12;
}
message InventoryUpgrade {
	.POGOProtos.Inventory.Item.ItemId item_id = 1;
	.POGOProtos.Inventory.InventoryUpgradeType upgrade_type = 2;
	int32 additional_storage = 3;
}
message InventoryUpgrades {
	repeated InventoryUpgrade inventory_upgrades = 1;
}
enum InventoryUpgradeType {
	UPGRADE_UNSET = 0;
	INCREASE_ITEM_STORAGE = 1;
	INCREASE_POKEMON_STORAGE = 2;
}
