//------------------------------------------------------------------------------
// <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 GameBuzkashiTrackData struct {
    Id int32
    Track string
    Type int32
    StartPos int32
    EndPos int32
    Local int32
}

const TypeId_GameBuzkashiTrackData = 1870817506

func (*GameBuzkashiTrackData) GetTypeId() int32 {
    return 1870817506
}

func (_v *GameBuzkashiTrackData)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; if _v.Track, _ok_ = _buf["track"].(string); !_ok_ { err = errors.New("track 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["startPos"].(float64); !_ok_ { err = errors.New("startPos error"); return }; _v.StartPos = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["endPos"].(float64); !_ok_ { err = errors.New("endPos error"); return }; _v.EndPos = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["local"].(float64); !_ok_ { err = errors.New("local error"); return }; _v.Local = int32(_tempNum_) }
    return
}

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