Including many pages of serialization code and generated source code in Master's thesis?
Short answer: put your code in public repo, and cite the repo in your paper.

Long answer: Any academic document you produce is supposed to be readable and useful to your readers. Try to put yourself in a reader's shoes and imagine how you feel reading through a 7-page long autogenerated code? Is is a pleasant or useful experience that you would like to repeat one day?

The modern technology allows us to use much more than just a text on the paper to present our research outputs. Although a short pieces of code may be extremely useful and appropriate in textbooks or some articles, the long code and auto-generated code really does not belong to the paper. It should be kept in a public repository, where it really belong, and used as a working example, which people can download, modify and execute, not just enjoy it aesthetically in a pdf file.