//------------------------------------------------------------------------------ // // 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 GameVenturegiftsDrawData struct { Drawkey int32 DrawType string Id *Gameatn Weight int32 Cost *Gameatn Type int32 } const TypeId_GameVenturegiftsDrawData = -742747078 func (*GameVenturegiftsDrawData) GetTypeId() int32 { return -742747078 } func (_v *GameVenturegiftsDrawData)Deserialize(_buf map[string]interface{}) (err error) { { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["drawkey"].(float64); !_ok_ { err = errors.New("drawkey error"); return }; _v.Drawkey = int32(_tempNum_) } { var _ok_ bool; if _v.DrawType, _ok_ = _buf["draw_type"].(string); !_ok_ { err = errors.New("draw_type error"); return } } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["id"].(map[string]interface{}); !_ok_ { err = errors.New("id error"); return }; if _v.Id, err = DeserializeGameatn(_x_); err != nil { return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["weight"].(float64); !_ok_ { err = errors.New("weight error"); return }; _v.Weight = int32(_tempNum_) } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["cost"].(map[string]interface{}); !_ok_ { err = errors.New("cost error"); return }; if _v.Cost, err = DeserializeGameatn(_x_); err != nil { return } } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) } return } func DeserializeGameVenturegiftsDrawData(_buf map[string]interface{}) (*GameVenturegiftsDrawData, error) { v := &GameVenturegiftsDrawData{} if err := v.Deserialize(_buf); err == nil { return v, nil } else { return nil, err } }