docs: def _to_dict(self):
          """Return a json dictionary representing this model."""
          _dict = {}
          if hasattr(self, 'position') and self.position is not None:
              _dict['position'] = self.position
          if hasattr(self, 'document_id') and self.document_id is not None:
              _dict['document_id'] = self.document_id
          if hasattr(self, 'score') and self.score is not None:
              _dict['score'] = self.score
          if hasattr(self, 'confidence') and self.confidence is not None:
              _dict['confidence'] = self.confidence
          if hasattr(self, 'collection_id') and self.collection_id is not None:
              _dict['collection_id'] = self.collection_id
          return _dict