code: func generateMessageTypeGetter(w io.Writer, structName string, msgType MessageType) {
  	fmt.Fprintln(w, "func (*"+structName+") GetMessageType() api.MessageType {")
  	if msgType == requestMessage {
  		fmt.Fprintln(w, "\treturn api.RequestMessage")
  	} else if msgType == replyMessage {
  		fmt.Fprintln(w, "\treturn api.ReplyMessage")
  	} else if msgType == eventMessage {
  		fmt.Fprintln(w, "\treturn api.EventMessage")
  	} else {
  		fmt.Fprintln(w, "\treturn api.OtherMessage")
  	}
  	fmt.Fprintln(w, "}")
  }
docs: // generateMessageTypeGetter generates message factory for the generated message into the provider writer