//------------------------------------------------------------------------------
// <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 GameSmithyAtlasScoreData struct {
    Id int32
    InitLv int32
    EntryNum int32
    Score int32
}

const TypeId_GameSmithyAtlasScoreData = -793121789

func (*GameSmithyAtlasScoreData) GetTypeId() int32 {
    return -793121789
}

func (_v *GameSmithyAtlasScoreData)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["initLv"].(float64); !_ok_ { err = errors.New("initLv error"); return }; _v.InitLv = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["entry_num"].(float64); !_ok_ { err = errors.New("entry_num error"); return }; _v.EntryNum = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["score"].(float64); !_ok_ { err = errors.New("score error"); return }; _v.Score = int32(_tempNum_) }
    return
}

func DeserializeGameSmithyAtlasScoreData(_buf map[string]interface{}) (*GameSmithyAtlasScoreData, error) {
    v := &GameSmithyAtlasScoreData{}
    if err := v.Deserialize(_buf); err == nil {
        return v, nil
    } else {
        return nil, err
    }
}
