def to_dict(self, by_alias: bool = False):
        """Returns the dictionary representation of the model"""
        _dict = self.dict(by_alias=by_alias,
                          exclude={
                          },
                          exclude_none=True)
        # set to None if usage_custom_reason (nullable) is None
        # and __fields_set__ contains the field
        if self.usage_custom_reason is None and "usage_custom_reason" in self.__fields_set__:
            _dict['usageCustomReason' if by_alias else 'usage_custom_reason'] = None

        return _dict
Returns the dictionary representation of the model
lightly/openapi_generated/swagger_client/models/questionnaire_data.py