62 lines
4.5 KiB
Go
62 lines
4.5 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 GameAskLibraryData struct {
|
|
Id int32
|
|
ExaminationGroup int32
|
|
Type int32
|
|
Topic string
|
|
PlanA string
|
|
PlanB string
|
|
PlanC string
|
|
PlanD string
|
|
Weight int32
|
|
Pic string
|
|
True string
|
|
Flase string
|
|
Fraction int32
|
|
Plantrue int32
|
|
}
|
|
|
|
const TypeId_GameAskLibraryData = -162756536
|
|
|
|
func (*GameAskLibraryData) GetTypeId() int32 {
|
|
return -162756536
|
|
}
|
|
|
|
func (_v *GameAskLibraryData)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["ExaminationGroup"].(float64); !_ok_ { err = errors.New("ExaminationGroup error"); return }; _v.ExaminationGroup = int32(_tempNum_) }
|
|
{ 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 __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["topic"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Topic error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Topic, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
|
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["planA"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.PlanA error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.PlanA, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
|
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["planB"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.PlanB error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.PlanB, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
|
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["planC"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.PlanC error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.PlanC, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
|
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["planD"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.PlanD error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.PlanD, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text 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_) }
|
|
{ var _ok_ bool; if _v.Pic, _ok_ = _buf["pic"].(string); !_ok_ { err = errors.New("pic error"); return } }
|
|
{ var _ok_ bool; if _v.True, _ok_ = _buf["True"].(string); !_ok_ { err = errors.New("True error"); return } }
|
|
{ var _ok_ bool; if _v.Flase, _ok_ = _buf["flase"].(string); !_ok_ { err = errors.New("flase error"); return } }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["fraction"].(float64); !_ok_ { err = errors.New("fraction error"); return }; _v.Fraction = int32(_tempNum_) }
|
|
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["plantrue"].(float64); !_ok_ { err = errors.New("plantrue error"); return }; _v.Plantrue = int32(_tempNum_) }
|
|
return
|
|
}
|
|
|
|
func DeserializeGameAskLibraryData(_buf map[string]interface{}) (*GameAskLibraryData, error) {
|
|
v := &GameAskLibraryData{}
|
|
if err := v.Deserialize(_buf); err == nil {
|
|
return v, nil
|
|
} else {
|
|
return nil, err
|
|
}
|
|
}
|