//------------------------------------------------------------------------------
// <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 GameCampLvData struct {
    Id int32
    ReputationLv int32
    RaceType int32
    ReputationExp int32
    Reward *Gameatn
}

const TypeId_GameCampLvData = -571721295

func (*GameCampLvData) GetTypeId() int32 {
    return -571721295
}

func (_v *GameCampLvData)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["reputation_lv"].(float64); !_ok_ { err = errors.New("reputation_lv error"); return }; _v.ReputationLv = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["raceType"].(float64); !_ok_ { err = errors.New("raceType error"); return }; _v.RaceType = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["reputation_exp"].(float64); !_ok_ { err = errors.New("reputation_exp error"); return }; _v.ReputationExp = int32(_tempNum_) }
    { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["Reward"].(map[string]interface{}); !_ok_ { err = errors.New("Reward error"); return }; if _v.Reward, err = DeserializeGameatn(_x_); err != nil { return } }
    return
}

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