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