go_dreamfactory/sys/configure/structs/Game.ShopCenterControlData.go
2023-08-02 15:03:27 +08:00

60 lines
3.7 KiB
Go

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type GameShopCenterControlData struct {
Id int32
Text string
Type int32
Index int32
Slogan string
Point string
Restriction int32
Lv int32
On int32
Time int32
Times int32
Duration int32
Loop int32
}
const TypeId_GameShopCenterControlData = 1201366464
func (*GameShopCenterControlData) GetTypeId() int32 {
return 1201366464
}
func (_v *GameShopCenterControlData)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 __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["text"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Text error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Text, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["index"].(float64); !_ok_ { err = errors.New("index error"); return }; _v.Index = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["slogan"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Slogan error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Slogan, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; if _v.Point, _ok_ = _buf["point"].(string); !_ok_ { err = errors.New("point error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["restriction"].(float64); !_ok_ { err = errors.New("restriction error"); return }; _v.Restriction = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["lv"].(float64); !_ok_ { err = errors.New("lv error"); return }; _v.Lv = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["on"].(float64); !_ok_ { err = errors.New("on error"); return }; _v.On = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time"].(float64); !_ok_ { err = errors.New("time error"); return }; _v.Time = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["times"].(float64); !_ok_ { err = errors.New("times error"); return }; _v.Times = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["duration"].(float64); !_ok_ { err = errors.New("duration error"); return }; _v.Duration = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["loop"].(float64); !_ok_ { err = errors.New("loop error"); return }; _v.Loop = int32(_tempNum_) }
return
}
func DeserializeGameShopCenterControlData(_buf map[string]interface{}) (*GameShopCenterControlData, error) {
v := &GameShopCenterControlData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}