---
layout: docs
title: setGeneratedFrom
id: class.Facebook.HackCodegen.CodegenUsesTrait.setGeneratedFrom
docid: class.Facebook.HackCodegen.CodegenUsesTrait.setGeneratedFrom
permalink: /docs/reference/class.Facebook.HackCodegen.CodegenUsesTrait.setGeneratedFrom/
---
# Facebook\\HackCodegen\\CodegenUsesTrait::setGeneratedFrom()




``` Hack
public function setGeneratedFrom(
  Facebook\HackCodegen\CodegenGeneratedFrom $from,
): this;
```




## Parameters




- [` Facebook\HackCodegen\CodegenGeneratedFrom `](<class.Facebook.HackCodegen.CodegenGeneratedFrom.md>)`` $from ``




## Returns




+ ` this `