func (s *Slot) WorkingSetSlotID() int64 {
	return s.Int("workingSetSlotId")
}
WorkingSetSlotID returns the working set slot ID.
package rep
import "github.com/icza/s2prot"
type InitData struct {
	s2prot.Struct
	GameDescription GameDescription `json:"-"`  
	LobbyState      LobbyState      `json:"-"`  
	UserInitDatas   []UserInitData  `json:"-"`  
}
func NewInitData(s s2prot.Struct) InitData {
	i := InitData{Struct: s.Structv("syncLobbyState")}
	i.GameDescription = GameDescription{Struct: i.Structv("gameDescription")}
	i.GameDescription.GameOptions = GameOptions{Struct: i.GameDescription.Structv("gameOptions")}
	i.LobbyState = LobbyState{Struct: i.Structv("lobbyState")}
	slots := i.LobbyState.Array("slots")
	i.LobbyState.Slots = make([]Slot, len(slots))
	for j, s := range slots {
		i.LobbyState.Slots[j] = Slot{Struct: s.(s2prot.Struct)}
	}
	uids := i.Array("userInitialData")
	i.UserInitDatas = make([]UserInitData, len(uids))
	for j, uid := range uids {
		u := UserInitData{Struct: uid.(s2prot.Struct)}
		if cl := u.Stringv("clanLogo"); cl != "" {
			u.ClanLogo = newCacheHandle(cl)
		}
		i.UserInitDatas[j] = u
	}
	return i
}
type GameDescription struct {
	s2prot.Struct
	GameOptions      GameOptions
	cacheHandles     []*CacheHandle     
	slotDescriptions []SlotDescription  
}
func (g *GameDescription) Region() *Region {
	if chs := g.CacheHandles(); len(chs) > 0 {
		return chs[0].Region
	}
	return RegionUnknown
}
func (g *GameDescription) ExpLevel() *ExpLevel {
	if chs := g.CacheHandles(); len(chs) > 0 {
		for _, exp := range ExpLevels {
			for _, ch := range chs {
				if exp.Digest == ch.Digest {
					return exp
				}
			}
		}
	}
	return ExpLevelUnknown
}
func (g *GameDescription) GameSpeed() *GameSpeed {
	return GameSpeeds[g.Int("gameSpeed")]
}
func (g *GameDescription) HasExtensionMod() bool {
	return g.Bool("hasExtensionMod")
}
func (g *GameDescription) HasNonBlizzardExtensionMod() bool {
	return g.Bool("hasNonBlizzardExtensionMod")
}
func (g *GameDescription) IsBlizzardMap() bool {
	return g.Bool("isBlizzardMap")
}
func (g *GameDescription) GameType() int64 {
	return g.Int("gameType")
}
func (g *GameDescription) IsCoopMode() bool {
	return g.Bool("isCoopMode")
}
func (g *GameDescription) IsPremadeFFA() bool {
	return g.Bool("isPremadeFFA")
}
func (g *GameDescription) MapAuthorName() string {
	return g.Stringv("mapAuthorName")
}
func (g *GameDescription) MapFileName() string {
	return g.Stringv("mapFileName")
}
func (g *GameDescription) MapFileSyncChecksum() int64 {
	return g.Int("mapFileSyncChecksum")
}
func (g *GameDescription) MapSizeX() int64 {
	return g.Int("mapSizeX")
}
func (g *GameDescription) MapSizeY() int64 {
	return g.Int("mapSizeY")
}
func (g *GameDescription) MaxColors() int64 {
	return g.Int("maxColors")
}
func (g *GameDescription) MaxControls() int64 {
	return g.Int("maxControls")
}
func (g *GameDescription) MaxObservers() int64 {
	return g.Int("maxObservers")
}
func (g *GameDescription) MaxPlayers() int64 {
	return g.Int("maxPlayers")
}
func (g *GameDescription) MaxRaces() int64 {
	return g.Int("maxRaces")
}
func (g *GameDescription) MaxTeams() int64 {
	return g.Int("maxTeams")
}
func (g *GameDescription) MaxUsers() int64 {
	return g.Int("maxUsers")
}
func (g *GameDescription) ModFileSyncChecksum() int64 {
	return g.Int("modFileSyncChecksum")
}
func (g *GameDescription) RandomValue() int64 {
	return g.Int("randomValue")
}
func (g *GameDescription) GameCacheName() string {
	return g.Stringv("gameCacheName")
}
func (g *GameDescription) DefaultAIBuild() int64 {
	return g.Int("defaultAIBuild")
}
func (g *GameDescription) DefaultDifficulty() int64 {
	return g.Int("defaultDifficulty")
}
func (g *GameDescription) CacheHandles() []*CacheHandle {
	if g.cacheHandles == nil {
		chs := g.Array("cacheHandles")
		g.cacheHandles = make([]*CacheHandle, len(chs))
		for i, ch := range chs {
			g.cacheHandles[i] = newCacheHandle(ch.(string))
		}
	}
	return g.cacheHandles
}
type GameOptions struct {
	s2prot.Struct
}
func (g *GameOptions) AdvancedSharedControl() bool {
	return g.Bool("advancedSharedControl")
}
func (g *GameOptions) Amm() bool {
	return g.Bool("amm")
}
func (g *GameOptions) BattleNet() bool {
	return g.Bool("battleNet")
}
func (g *GameOptions) ClientDebugFlags() int64 {
	return g.Int("clientDebugFlags")
}
func (g *GameOptions) CompetitiveOrRanked() bool {
	if v, ok := g.Value("competitive").(bool); ok {
		return v
	}
	return g.Bool("ranked")
}
func (g *GameOptions) Fog() int64 {
	return g.Int("fog")
}
func (g *GameOptions) LockTeams() bool {
	return g.Bool("lockTeams")
}
func (g *GameOptions) NoVictoryOrDefeat() bool {
	return g.Bool("noVictoryOrDefeat")
}
func (g *GameOptions) Observers() int64 {
	return g.Int("observers")
}
func (g *GameOptions) RandomRaces() bool {
	return g.Bool("randomRaces")
}
func (g *GameOptions) TeamsTogether() bool {
	return g.Bool("teamsTogether")
}
func (g *GameOptions) UserDifficulty() int64 {
	return g.Int("userDifficulty")
}
func (g *GameOptions) Practice() bool {
	return g.Bool("practice")
}
func (g *GameOptions) Cooperative() bool {
	return g.Bool("cooperative")
}
func (g *GameOptions) HeroDuplicatesAllowed() bool {
	return g.Bool("heroDuplicatesAllowed")
}
func (g *GameDescription) SlotDescriptions() []SlotDescription {
	if g.slotDescriptions == nil {
		sds := g.Array("slotDescriptions")
		g.slotDescriptions = make([]SlotDescription, len(sds))
		for i, sd := range sds {
			g.slotDescriptions[i] = SlotDescription{Struct: sd.(s2prot.Struct)}
		}
	}
	return g.slotDescriptions
}
type SlotDescription struct {
	s2prot.Struct
}
func (s *SlotDescription) AllowedAIBuilds() s2prot.BitArr {
	return s.BitArr("allowedAIBuilds")
}
func (s *SlotDescription) AllowedColors() s2prot.BitArr {
	return s.BitArr("allowedColors")
}
func (s *SlotDescription) AllowedControls() s2prot.BitArr {
	return s.BitArr("allowedControls")
}
func (s *SlotDescription) AllowedDifficulty() s2prot.BitArr {
	return s.BitArr("allowedDifficulty")
}
func (s *SlotDescription) AllowedObserveTypes() s2prot.BitArr {
	return s.BitArr("allowedObserveTypes")
}
func (s *SlotDescription) AllowedRaces() s2prot.BitArr {
	return s.BitArr("allowedRaces")
}
type LobbyState struct {
	s2prot.Struct
	Slots []Slot
}
func (l *LobbyState) DefaultAIBuild() int64 {
	return l.Int("defaultAIBuild")
}
func (l *LobbyState) DefaultDifficulty() int64 {
	return l.Int("defaultDifficulty")
}
func (l *LobbyState) GameDuration() int64 {
	return l.Int("gameDuration")
}
func (l *LobbyState) HostUserID() int64 {
	return l.Int("hostUserId")
}
func (l *LobbyState) IsSinglePlayer() bool {
	return l.Bool("isSinglePlayer")
}
func (l *LobbyState) MaxObservers() int64 {
	return l.Int("maxObservers")
}
func (l *LobbyState) MaxUsers() int64 {
	return l.Int("maxUsers")
}
func (l *LobbyState) Phase() int64 {
	return l.Int("phase")
}
func (l *LobbyState) RandomSeed() int64 {
	return l.Int("randomSeed")
}
func (l *LobbyState) PickedMapTag() int64 {
	return l.Int("pickedMapTag")
}
type Slot struct {
	s2prot.Struct
}
func (s *Slot) AIBuild() int64 {
	return s.Int("aiBuild")
}
func (s *Slot) ColorPrefColor() *Color {
	return colorByID(s.Int("colorPref", "color"))
}
func (s *Slot) Control() *Control {
	return controlByID(s.Int("control"))
}
func (s *Slot) Difficulty() int64 {
	return s.Int("difficulty")
}
func (s *Slot) Handicap() int64 {
	return s.Int("handicap")
}
func (s *Slot) Licenses() []interface{} {
	return s.Array("licenses")
}
func (s *Slot) LogoIndex() int64 {
	return s.Int("logoIndex")
}
func (s *Slot) TandemID() int64 {
	return s.Int("tandemId")
}
func (s *Slot) TandemLeaderUserID() int64 {
	return s.Int("tandemLeaderUserId")
}
func (s *Slot) Observe() *Observe {
	return observeByID(s.Int("observe"))
}
func (s *Slot) RacePrefRace() *Race {
	if rp := s.Structv("racePref"); rp != nil {
		r := rp.Value("race")
		if r == nil {
			return RaceRandom
		}
		if i, ok := r.(int64); ok {
			return raceByID(i)
		}
	}
	return RaceUnknown
}
func (s *Slot) Rewards() []interface{} {
	return s.Array("rewards")
}
func (s *Slot) TeamID() int64 {
	return s.Int("teamId")
}
func (s *Slot) ToonHandle() string {
	return s.Stringv("toonHandle")
}
func (s *Slot) UserID() int64 {
	return s.Int("userId")
}