//------------------------------------------------------------------------------ // // 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 GameNewRedDotData struct { Id int32 MsgType int32 TreeType int32 ShowType int32 CountType int32 Group string Path string Header string } const TypeId_GameNewRedDotData = 943392646 func (*GameNewRedDotData) GetTypeId() int32 { return 943392646 } func (_v *GameNewRedDotData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["msg_type"].(float64); !_ok_ { err = errors.New("msg_type error"); return }; _v.MsgType = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["tree_type"].(float64); !_ok_ { err = errors.New("tree_type error"); return }; _v.TreeType = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["show_type"].(float64); !_ok_ { err = errors.New("show_type error"); return }; _v.ShowType = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["count_type"].(float64); !_ok_ { err = errors.New("count_type error"); return }; _v.CountType = int32(_tempNum_) } { var _ok_ bool; if _v.Group, _ok_ = _buf["group"].(string); !_ok_ { err = errors.New("group error"); return } } { var _ok_ bool; if _v.Path, _ok_ = _buf["path"].(string); !_ok_ { err = errors.New("path error"); return } } { var _ok_ bool; if _v.Header, _ok_ = _buf["header"].(string); !_ok_ { err = errors.New("header error"); return } } return } func DeserializeGameNewRedDotData(_buf map[string]interface{}) (*GameNewRedDotData, error) { v := &GameNewRedDotData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { return nil, err } }