class_docstr: Classify, map source, and parse a raw record into its declared type.
class_docstr_tok: ["Classify",",","map","source",",","and","parse","a","raw","record","into","its","declared","type","."]
docstr: Run the payload through the classification logic to determine the data type
  
  Args:
      payload (StreamPayload): StreamAlert payload object being processed
docstr_tok: ["Run","the","payload","through","the","classification","logic","to","determine","the","data","type","Args",":","payload","(","StreamPayload",")",":","StreamAlert","payload","object","being","processed"]
code: def _classify_payload(self, payload):
      """Run the payload through the classification logic to determine the data type
  
      Args:
          payload (StreamPayload): StreamAlert payload object being processed
      """
      # Get logs defined for the service/entity in the config
      logs_config = self._load_logs_for_resource(
          payload.service(), payload.resource
      )
      if not logs_config:
          LOGGER.error(
              "No log types defined for resource [%s] in sources configuration for service [%s]",
              payload.resource,
              payload.service(),
          )
          return
  
      for record in payload.pre_parse():
          # Increment the processed size using the length of this record
          self._processed_size += len(record)
  
          # Get the parser for this data
          self._process_log_schemas(record, logs_config)
  
          LOGGER.debug(
              "Parsed and classified payload: %s", bool(record)
          )
  
          payload.fully_classified = payload.fully_classified and record
          if not record:
              self._log_bad_records(record, 1)
              continue
  
          LOGGER.debug(
              "Classified %d record(s) with schema: %s",
              len(record.parsed_records),
              record.log_schema_type,
          )
  
          # Even if the parser was successful, there's a chance it
          # could not parse all records, so log them here as invalid
          self._log_bad_records(record, len(record.invalid_records))
  
          for parsed_rec in record.parsed_records:
              #
              # In Normalization v1, the normalized types are defined based on log source
              # (e.g. osquery, cloudwatch etc) and this will be deprecated.
              # In Normalization v2, the normalized types are defined based on log type
              # (e.g. osquery:differential, cloudwatch:cloudtrail, cloudwatch:events etc)
              #
              Normalizer.normalize(parsed_rec, record.log_schema_type)
  
          self._payloads.append(record)
  
imports: from collections import OrderedDict
  import os
  import logging
  from streamalert.classifier.clients import SQSClient
  from streamalert.shared.firehose import FirehoseClient
  from streamalert.classifier.parsers import get_parser
  from streamalert.classifier.payload.payload_base import StreamPayload
  from streamalert.shared import config, CLASSIFIER_FUNCTION_NAME
  from streamalert.shared.artifact_extractor import ArtifactExtractor
  from streamalert.shared.exceptions import ConfigError
  from streamalert.shared.logger import get_logger
  from streamalert.shared.metrics import MetricLogger
  from streamalert.shared.normalize import Normalizer
label_desc: Use image node_id 9 for calling the Classifier obj's underlying member method code with example usage: obj._classify_payload(payload) without return types