docs: def _to_dict(self):
          """Return a json dictionary representing this model."""
          _dict = {}
          if hasattr(self, 'types') and self.types is not None:
              _dict['types'] = [x._to_dict() for x in self.types]
          if hasattr(self, 'categories') and self.categories is not None:
              _dict['categories'] = [x._to_dict() for x in self.categories]
          return _dict