//------------------------------------------------------------------------------
// <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 GameChatExpressionData struct {
    Key int32
    ExpressionCode string
    ExpressionType int32
    ExpressionIcon string
}

const TypeId_GameChatExpressionData = 495857494

func (*GameChatExpressionData) GetTypeId() int32 {
    return 495857494
}

func (_v *GameChatExpressionData)Deserialize(_buf map[string]interface{}) (err error) {
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
    { var _ok_ bool; if _v.ExpressionCode, _ok_ = _buf["expression_code"].(string); !_ok_ { err = errors.New("expression_code error"); return } }
    { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["expression_type"].(float64); !_ok_ { err = errors.New("expression_type error"); return }; _v.ExpressionType = int32(_tempNum_) }
    { var _ok_ bool; if _v.ExpressionIcon, _ok_ = _buf["expression_icon"].(string); !_ok_ { err = errors.New("expression_icon error"); return } }
    return
}

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