//------------------------------------------------------------------------------
// <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 Gamekv struct {
    K int32
    V int32
}

const TypeId_Gamekv = 1468999879

func (*Gamekv) GetTypeId() int32 {
    return 1468999879
}

func (_v *Gamekv)Deserialize(_buf map[string]interface{}) (err error) {
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["k"].(float64); !_ok_ { err = errors.New("k error"); return }; _v.K = int32(_tempNum_) }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["v"].(float64); !_ok_ { err = errors.New("v error"); return }; _v.V = int32(_tempNum_) }
    return
}

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