func (st *OnStartupReq) ReadFrom(_is *codec.Reader) error {
	var err error
	var length int32
	var have bool
	var ty byte
	st.ResetDefault()
	err = _is.Read_string(&st.NodeName, 0, true)
	if err != nil {
		return err
	}
	err = _is.Read_string(&st.Application, 1, true)
	if err != nil {
		return err
	}
	err = _is.Read_string(&st.Server, 2, true)
	if err != nil {
		return err
	}
	err = _is.Read_string(&st.SetID, 3, false)
	if err != nil {
		return err
	}
	err, have, ty = _is.SkipToNoCheck(4, false)
	if err != nil {
		return err
	}
	if have {
		if ty == codec.LIST {
			err = _is.Read_int32(&length, 0, true)
			if err != nil {
				return err
			}
			st.Adapters = make([]AdapterConf, length)
			for i0, e0 := int32(0), length; i0 < e0; i0++ {
				err = st.Adapters[i0].ReadBlock(_is, 0, false)
				if err != nil {
					return err
				}
			}
		} else if ty == codec.SIMPLE_LIST {
			err = fmt.Errorf("not support simple_list type")
			if err != nil {
				return err
			}
		} else {
			err = fmt.Errorf("require vector, but not")
			if err != nil {
				return err
			}
		}
	}
	err = _is.Read_bool(&st.DisableFlow, 5, false)
	if err != nil {
		return err
	}
	err = _is.Read_string(&st.State, 6, false)
	if err != nil {
		return err
	}
	err = _is.Read_string(&st.Version, 7, false)
	if err != nil {
		return err
	}
	_ = err
	_ = length
	_ = have
	_ = ty
	return nil
}
ReadFrom reads  from _is and put into struct.
package tars
import (
	"fmt"
	"github.com/TarsCloud/TarsGo/tars/protocol/codec"
)
var _ = fmt.Errorf
var _ = codec.FromInt8
type AdapterConf struct {
	Servant      string `json:"servant"`
	Endpoint     string `json:"endpoint"`
	Protocol     string `json:"protocol"`
	MaxConns     int32  `json:"maxConns"`
	ThreadNum    int32  `json:"threadNum"`
	QueueCap     int32  `json:"queueCap"`
	QueueTimeout int32  `json:"queueTimeout"`
}
func (st *AdapterConf) ResetDefault() {
}
func (st *AdapterConf) ReadFrom(_is *codec.Reader) error {
	var err error
	var length int32
	var have bool
	var ty byte
	st.ResetDefault()
	err = _is.Read_string(&st.Servant, 0, true)
	if err != nil {
		return err
	}
	err = _is.Read_string(&st.Endpoint, 1, true)
	if err != nil {
		return err
	}
	err = _is.Read_string(&st.Protocol, 2, false)
	if err != nil {
		return err
	}
	err = _is.Read_int32(&st.MaxConns, 3, false)
	if err != nil {
		return err
	}
	err = _is.Read_int32(&st.ThreadNum, 4, false)
	if err != nil {
		return err
	}
	err = _is.Read_int32(&st.QueueCap, 5, false)
	if err != nil {
		return err
	}
	err = _is.Read_int32(&st.QueueTimeout, 6, false)
	if err != nil {
		return err
	}
	_ = err
	_ = length
	_ = have
	_ = ty
	return nil
}
func (st *AdapterConf) ReadBlock(_is *codec.Reader, tag byte, require bool) error {
	var err error
	var have bool
	st.ResetDefault()
	err, have = _is.SkipTo(codec.STRUCT_BEGIN, tag, require)
	if err != nil {
		return err
	}
	if !have {
		if require {
			return fmt.Errorf("require AdapterConf, but not exist. tag %d", tag)
		}
		return nil
	}
	err = st.ReadFrom(_is)
	if err != nil {
		return err
	}
	err = _is.SkipToStructEnd()
	if err != nil {
		return err
	}
	_ = have
	return nil
}
func (st *AdapterConf) WriteTo(_os *codec.Buffer) error {
	var err error
	err = _os.Write_string(st.Servant, 0)
	if err != nil {
		return err
	}
	err = _os.Write_string(st.Endpoint, 1)
	if err != nil {
		return err
	}
	err = _os.Write_string(st.Protocol, 2)
	if err != nil {
		return err
	}
	err = _os.Write_int32(st.MaxConns, 3)
	if err != nil {
		return err
	}
	err = _os.Write_int32(st.ThreadNum, 4)
	if err != nil {
		return err
	}
	err = _os.Write_int32(st.QueueCap, 5)
	if err != nil {
		return err
	}
	err = _os.Write_int32(st.QueueTimeout, 6)
	if err != nil {
		return err
	}
	_ = err
	return nil
}
func (st *AdapterConf) WriteBlock(_os *codec.Buffer, tag byte) error {
	var err error
	err = _os.WriteHead(codec.STRUCT_BEGIN, tag)
	if err != nil {
		return err
	}
	err = st.WriteTo(_os)
	if err != nil {
		return err
	}
	err = _os.WriteHead(codec.STRUCT_END, 0)
	if err != nil {
		return err
	}
	return nil
}
type OnStartupReq struct {
	NodeName    string        `json:"nodeName"`
	Application string        `json:"application"`
	Server      string        `json:"server"`
	SetID       string        `json:"setID"`
	Adapters    []AdapterConf `json:"adapters"`
	DisableFlow bool          `json:"disableFlow"`
	State       string        `json:"State"`
	Version     string        `json:"Version"`
}
func (st *OnStartupReq) ResetDefault() {
	st.State = "active"
}