code: def ParseRecord(self, parser_mediator, key, structure):
      
      if key not in self._SUPPORTED_KEYS:
        raise errors.ParseError(
            'Unable to parse record, unknown structure: {0:s}'.format(key))
  
      date_time = dfdatetime_time_elements.TimeElements()
  
      try:
        iso_date_time = self._GetISO8601String(structure.date_time)
        date_time.CopyFromStringISO8601(iso_date_time)
      except ValueError:
        parser_mediator.ProduceExtractionWarning(
            'invalid date time value: {0!s}'.format(structure.date_time))
        return
  
      event = time_events.DateTimeValuesEvent(
          date_time, definitions.TIME_DESCRIPTION_RECORDED)
  
      event_data = ApacheAccessEventData()
      event_data.ip_address = structure.ip_address
      event_data.remote_name = structure.remote_name
      event_data.user_name = structure.user_name
      event_data.http_request = structure.http_request
      event_data.http_response_code = structure.response_code
      event_data.http_response_bytes = structure.response_bytes
  
      if key == 'combined_log_format':
        event_data.http_request_referer = structure.referer
        event_data.http_request_user_agent = structure.user_agent
  
      parser_mediator.ProduceEventWithEventData(event, event_data)
docs: Parses a matching entry.
  
      Args:
        parser_mediator (ParserMediator): mediates interactions between parsers
          and other components, such as storage and dfvfs.
        key (str): name of the parsed structure.
        structure (pyparsing.ParseResults): elements parsed from the file.
  
      Raises:
        ParseError: when the structure type is unknown.