code: def to_dict(self):
          
          d = {}
          if self.query_params_match is not None:
              d['@query_params_match'] = self.query_params_match
          if self.query_person_match is not None:
              d['@query_person_match'] = self.query_person_match
          if self.valid_since is not None:
              d['@valid_since'] = datetime_to_str(self.valid_since)
          if self.source is not None:
              d['source'] = self.source.to_dict()
          d.update(self.fields_to_dict())
          return d
docs: Return a dict representation of the record.