class_docstr: Accepts parameters that specify an S3 input for an auto ml job
  
  Provides a method to turn those parameters into a dictionary.
docstr: Generates a request dictionary using the parameters provided to the class.
docstr_tok: ["Generates","a","request","dictionary","using","the","parameters","provided","to","the","class","."]
code: def to_request_dict(self):
      """Generates a request dictionary using the parameters provided to the class."""
      # Create the request dictionary.
      auto_ml_input = []
      if isinstance(self.inputs, string_types):
          self.inputs = [self.inputs]
      if isinstance(self.inputs, PipelineVariable):
          self.inputs = [self.inputs]
      for entry in self.inputs:
          input_entry = {
              "DataSource": {
                  "S3DataSource": {
                      "S3DataType": "S3Prefix",
                      "S3Uri": entry,
                  }
              },
              "TargetAttributeName": self.target_attribute_name,
          }
          if self.compression is not None:
              input_entry["CompressionType"] = self.compression
          if self.channel_type is not None:
              input_entry["ChannelType"] = self.channel_type
          if self.content_type is not None:
              input_entry["ContentType"] = self.content_type
          if self.s3_data_type is not None:
              input_entry["DataSource"]["S3DataSource"][
                  "S3DataType"
              ] = self.s3_data_type
          if self.sample_weight_attribute_name is not None:
              input_entry[
                  "SampleWeightAttributeName"
              ] = self.sample_weight_attribute_name
          auto_ml_input.append(input_entry)
      return auto_ml_input
  
imports: from __future__ import absolute_import
  import logging
  from typing import Optional, List, Dict
  from six import string_types
  from sagemaker import Model, PipelineModel, s3
  from sagemaker.automl.candidate_estimator import CandidateEstimator
  from sagemaker.config import AUTO_ML_ROLE_ARN_PATH, AUTO_ML_KMS_KEY_ID_PATH, AUTO_ML_VPC_CONFIG_PATH, AUTO_ML_VOLUME_KMS_KEY_ID_PATH, AUTO_ML_INTER_CONTAINER_ENCRYPTION_PATH
  from sagemaker.job import _Job
  from sagemaker.session import Session
  from sagemaker.utils import name_from_base, resolve_value_from_config, format_tags, Tags
  from sagemaker.workflow.entities import PipelineVariable
  from sagemaker.workflow.pipeline_context import runnable_by_pipeline
label_desc: Use image node_id 2 for calling the AutoMLInput obj's underlying member method code with example usage: obj.to_request_dict() and returns: auto_ml_input