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




``` Hack
public function setIsOptional(
  bool $value = true,
): this;
```




## Parameters




+ ` bool $value = true `




## Returns




* ` this `