//------------------------------------------------------------------------------ // // This code was generated by a tool. // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ package cfg import "errors" type GameCardPoolData struct { Key int32 CardPoolType string Id string Weight int32 } const TypeId_GameCardPoolData = 1562200466 func (*GameCardPoolData) GetTypeId() int32 { return 1562200466 } func (_v *GameCardPoolData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) } { var _ok_ bool; if _v.CardPoolType, _ok_ = _buf["card_pool_type"].(string); !_ok_ { err = errors.New("card_pool_type error"); return } } { var _ok_ bool; if _v.Id, _ok_ = _buf["id"].(string); !_ok_ { err = errors.New("id error"); return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weight"].(float64); !_ok_ { err = errors.New("weight error"); return }; _v.Weight = int32(_tempNum_) } return } func DeserializeGameCardPoolData(_buf map[string]interface{}) (*GameCardPoolData, error) { v := &GameCardPoolData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { return nil, err } }