{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMaker.Types.ProcessingS3Input
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.ProcessingS3Input where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ProcessingS3CompressionType
import Amazonka.SageMaker.Types.ProcessingS3DataDistributionType
import Amazonka.SageMaker.Types.ProcessingS3DataType
import Amazonka.SageMaker.Types.ProcessingS3InputMode

-- | Configuration for downloading input data from Amazon S3 into the
-- processing container.
--
-- /See:/ 'newProcessingS3Input' smart constructor.
data ProcessingS3Input = ProcessingS3Input'
  { -- | Whether to distribute the data from Amazon S3 to all processing
    -- instances with @FullyReplicated@, or whether the data from Amazon S3 is
    -- shared by Amazon S3 key, downloading one shard of data to each
    -- processing instance.
    ProcessingS3Input -> Maybe ProcessingS3DataDistributionType
s3DataDistributionType :: Prelude.Maybe ProcessingS3DataDistributionType,
    -- | Whether to use @File@ or @Pipe@ input mode. In File mode, Amazon
    -- SageMaker copies the data from the input source onto the local ML
    -- storage volume before starting your processing container. This is the
    -- most commonly used input mode. In @Pipe@ mode, Amazon SageMaker streams
    -- input data from the source directly to your processing container into
    -- named pipes without using the ML storage volume.
    ProcessingS3Input -> Maybe ProcessingS3InputMode
s3InputMode :: Prelude.Maybe ProcessingS3InputMode,
    -- | The local path in your container where you want Amazon SageMaker to
    -- write input data to. @LocalPath@ is an absolute path to the input data
    -- and must begin with @\/opt\/ml\/processing\/@. @LocalPath@ is a required
    -- parameter when @AppManaged@ is @False@ (default).
    ProcessingS3Input -> Maybe Text
localPath :: Prelude.Maybe Prelude.Text,
    -- | Whether to GZIP-decompress the data in Amazon S3 as it is streamed into
    -- the processing container. @Gzip@ can only be used when @Pipe@ mode is
    -- specified as the @S3InputMode@. In @Pipe@ mode, Amazon SageMaker streams
    -- input data from the source directly to your container without using the
    -- EBS volume.
    ProcessingS3Input -> Maybe ProcessingS3CompressionType
s3CompressionType :: Prelude.Maybe ProcessingS3CompressionType,
    -- | The URI of the Amazon S3 prefix Amazon SageMaker downloads data required
    -- to run a processing job.
    ProcessingS3Input -> Text
s3Uri :: Prelude.Text,
    -- | Whether you use an @S3Prefix@ or a @ManifestFile@ for the data type. If
    -- you choose @S3Prefix@, @S3Uri@ identifies a key name prefix. Amazon
    -- SageMaker uses all objects with the specified key name prefix for the
    -- processing job. If you choose @ManifestFile@, @S3Uri@ identifies an
    -- object that is a manifest file containing a list of object keys that you
    -- want Amazon SageMaker to use for the processing job.
    ProcessingS3Input -> ProcessingS3DataType
s3DataType :: ProcessingS3DataType
  }
  deriving (ProcessingS3Input -> ProcessingS3Input -> Bool
(ProcessingS3Input -> ProcessingS3Input -> Bool)
-> (ProcessingS3Input -> ProcessingS3Input -> Bool)
-> Eq ProcessingS3Input
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProcessingS3Input -> ProcessingS3Input -> Bool
$c/= :: ProcessingS3Input -> ProcessingS3Input -> Bool
== :: ProcessingS3Input -> ProcessingS3Input -> Bool
$c== :: ProcessingS3Input -> ProcessingS3Input -> Bool
Prelude.Eq, ReadPrec [ProcessingS3Input]
ReadPrec ProcessingS3Input
Int -> ReadS ProcessingS3Input
ReadS [ProcessingS3Input]
(Int -> ReadS ProcessingS3Input)
-> ReadS [ProcessingS3Input]
-> ReadPrec ProcessingS3Input
-> ReadPrec [ProcessingS3Input]
-> Read ProcessingS3Input
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProcessingS3Input]
$creadListPrec :: ReadPrec [ProcessingS3Input]
readPrec :: ReadPrec ProcessingS3Input
$creadPrec :: ReadPrec ProcessingS3Input
readList :: ReadS [ProcessingS3Input]
$creadList :: ReadS [ProcessingS3Input]
readsPrec :: Int -> ReadS ProcessingS3Input
$creadsPrec :: Int -> ReadS ProcessingS3Input
Prelude.Read, Int -> ProcessingS3Input -> ShowS
[ProcessingS3Input] -> ShowS
ProcessingS3Input -> String
(Int -> ProcessingS3Input -> ShowS)
-> (ProcessingS3Input -> String)
-> ([ProcessingS3Input] -> ShowS)
-> Show ProcessingS3Input
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProcessingS3Input] -> ShowS
$cshowList :: [ProcessingS3Input] -> ShowS
show :: ProcessingS3Input -> String
$cshow :: ProcessingS3Input -> String
showsPrec :: Int -> ProcessingS3Input -> ShowS
$cshowsPrec :: Int -> ProcessingS3Input -> ShowS
Prelude.Show, (forall x. ProcessingS3Input -> Rep ProcessingS3Input x)
-> (forall x. Rep ProcessingS3Input x -> ProcessingS3Input)
-> Generic ProcessingS3Input
forall x. Rep ProcessingS3Input x -> ProcessingS3Input
forall x. ProcessingS3Input -> Rep ProcessingS3Input x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProcessingS3Input x -> ProcessingS3Input
$cfrom :: forall x. ProcessingS3Input -> Rep ProcessingS3Input x
Prelude.Generic)

-- |
-- Create a value of 'ProcessingS3Input' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 's3DataDistributionType', 'processingS3Input_s3DataDistributionType' - Whether to distribute the data from Amazon S3 to all processing
-- instances with @FullyReplicated@, or whether the data from Amazon S3 is
-- shared by Amazon S3 key, downloading one shard of data to each
-- processing instance.
--
-- 's3InputMode', 'processingS3Input_s3InputMode' - Whether to use @File@ or @Pipe@ input mode. In File mode, Amazon
-- SageMaker copies the data from the input source onto the local ML
-- storage volume before starting your processing container. This is the
-- most commonly used input mode. In @Pipe@ mode, Amazon SageMaker streams
-- input data from the source directly to your processing container into
-- named pipes without using the ML storage volume.
--
-- 'localPath', 'processingS3Input_localPath' - The local path in your container where you want Amazon SageMaker to
-- write input data to. @LocalPath@ is an absolute path to the input data
-- and must begin with @\/opt\/ml\/processing\/@. @LocalPath@ is a required
-- parameter when @AppManaged@ is @False@ (default).
--
-- 's3CompressionType', 'processingS3Input_s3CompressionType' - Whether to GZIP-decompress the data in Amazon S3 as it is streamed into
-- the processing container. @Gzip@ can only be used when @Pipe@ mode is
-- specified as the @S3InputMode@. In @Pipe@ mode, Amazon SageMaker streams
-- input data from the source directly to your container without using the
-- EBS volume.
--
-- 's3Uri', 'processingS3Input_s3Uri' - The URI of the Amazon S3 prefix Amazon SageMaker downloads data required
-- to run a processing job.
--
-- 's3DataType', 'processingS3Input_s3DataType' - Whether you use an @S3Prefix@ or a @ManifestFile@ for the data type. If
-- you choose @S3Prefix@, @S3Uri@ identifies a key name prefix. Amazon
-- SageMaker uses all objects with the specified key name prefix for the
-- processing job. If you choose @ManifestFile@, @S3Uri@ identifies an
-- object that is a manifest file containing a list of object keys that you
-- want Amazon SageMaker to use for the processing job.
newProcessingS3Input ::
  -- | 's3Uri'
  Prelude.Text ->
  -- | 's3DataType'
  ProcessingS3DataType ->
  ProcessingS3Input
newProcessingS3Input :: Text -> ProcessingS3DataType -> ProcessingS3Input
newProcessingS3Input Text
pS3Uri_ ProcessingS3DataType
pS3DataType_ =
  ProcessingS3Input' :: Maybe ProcessingS3DataDistributionType
-> Maybe ProcessingS3InputMode
-> Maybe Text
-> Maybe ProcessingS3CompressionType
-> Text
-> ProcessingS3DataType
-> ProcessingS3Input
ProcessingS3Input'
    { $sel:s3DataDistributionType:ProcessingS3Input' :: Maybe ProcessingS3DataDistributionType
s3DataDistributionType =
        Maybe ProcessingS3DataDistributionType
forall a. Maybe a
Prelude.Nothing,
      $sel:s3InputMode:ProcessingS3Input' :: Maybe ProcessingS3InputMode
s3InputMode = Maybe ProcessingS3InputMode
forall a. Maybe a
Prelude.Nothing,
      $sel:localPath:ProcessingS3Input' :: Maybe Text
localPath = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:s3CompressionType:ProcessingS3Input' :: Maybe ProcessingS3CompressionType
s3CompressionType = Maybe ProcessingS3CompressionType
forall a. Maybe a
Prelude.Nothing,
      $sel:s3Uri:ProcessingS3Input' :: Text
s3Uri = Text
pS3Uri_,
      $sel:s3DataType:ProcessingS3Input' :: ProcessingS3DataType
s3DataType = ProcessingS3DataType
pS3DataType_
    }

-- | Whether to distribute the data from Amazon S3 to all processing
-- instances with @FullyReplicated@, or whether the data from Amazon S3 is
-- shared by Amazon S3 key, downloading one shard of data to each
-- processing instance.
processingS3Input_s3DataDistributionType :: Lens.Lens' ProcessingS3Input (Prelude.Maybe ProcessingS3DataDistributionType)
processingS3Input_s3DataDistributionType :: (Maybe ProcessingS3DataDistributionType
 -> f (Maybe ProcessingS3DataDistributionType))
-> ProcessingS3Input -> f ProcessingS3Input
processingS3Input_s3DataDistributionType = (ProcessingS3Input -> Maybe ProcessingS3DataDistributionType)
-> (ProcessingS3Input
    -> Maybe ProcessingS3DataDistributionType -> ProcessingS3Input)
-> Lens
     ProcessingS3Input
     ProcessingS3Input
     (Maybe ProcessingS3DataDistributionType)
     (Maybe ProcessingS3DataDistributionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingS3Input' {Maybe ProcessingS3DataDistributionType
s3DataDistributionType :: Maybe ProcessingS3DataDistributionType
$sel:s3DataDistributionType:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3DataDistributionType
s3DataDistributionType} -> Maybe ProcessingS3DataDistributionType
s3DataDistributionType) (\s :: ProcessingS3Input
s@ProcessingS3Input' {} Maybe ProcessingS3DataDistributionType
a -> ProcessingS3Input
s {$sel:s3DataDistributionType:ProcessingS3Input' :: Maybe ProcessingS3DataDistributionType
s3DataDistributionType = Maybe ProcessingS3DataDistributionType
a} :: ProcessingS3Input)

-- | Whether to use @File@ or @Pipe@ input mode. In File mode, Amazon
-- SageMaker copies the data from the input source onto the local ML
-- storage volume before starting your processing container. This is the
-- most commonly used input mode. In @Pipe@ mode, Amazon SageMaker streams
-- input data from the source directly to your processing container into
-- named pipes without using the ML storage volume.
processingS3Input_s3InputMode :: Lens.Lens' ProcessingS3Input (Prelude.Maybe ProcessingS3InputMode)
processingS3Input_s3InputMode :: (Maybe ProcessingS3InputMode -> f (Maybe ProcessingS3InputMode))
-> ProcessingS3Input -> f ProcessingS3Input
processingS3Input_s3InputMode = (ProcessingS3Input -> Maybe ProcessingS3InputMode)
-> (ProcessingS3Input
    -> Maybe ProcessingS3InputMode -> ProcessingS3Input)
-> Lens
     ProcessingS3Input
     ProcessingS3Input
     (Maybe ProcessingS3InputMode)
     (Maybe ProcessingS3InputMode)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingS3Input' {Maybe ProcessingS3InputMode
s3InputMode :: Maybe ProcessingS3InputMode
$sel:s3InputMode:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3InputMode
s3InputMode} -> Maybe ProcessingS3InputMode
s3InputMode) (\s :: ProcessingS3Input
s@ProcessingS3Input' {} Maybe ProcessingS3InputMode
a -> ProcessingS3Input
s {$sel:s3InputMode:ProcessingS3Input' :: Maybe ProcessingS3InputMode
s3InputMode = Maybe ProcessingS3InputMode
a} :: ProcessingS3Input)

-- | The local path in your container where you want Amazon SageMaker to
-- write input data to. @LocalPath@ is an absolute path to the input data
-- and must begin with @\/opt\/ml\/processing\/@. @LocalPath@ is a required
-- parameter when @AppManaged@ is @False@ (default).
processingS3Input_localPath :: Lens.Lens' ProcessingS3Input (Prelude.Maybe Prelude.Text)
processingS3Input_localPath :: (Maybe Text -> f (Maybe Text))
-> ProcessingS3Input -> f ProcessingS3Input
processingS3Input_localPath = (ProcessingS3Input -> Maybe Text)
-> (ProcessingS3Input -> Maybe Text -> ProcessingS3Input)
-> Lens
     ProcessingS3Input ProcessingS3Input (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingS3Input' {Maybe Text
localPath :: Maybe Text
$sel:localPath:ProcessingS3Input' :: ProcessingS3Input -> Maybe Text
localPath} -> Maybe Text
localPath) (\s :: ProcessingS3Input
s@ProcessingS3Input' {} Maybe Text
a -> ProcessingS3Input
s {$sel:localPath:ProcessingS3Input' :: Maybe Text
localPath = Maybe Text
a} :: ProcessingS3Input)

-- | Whether to GZIP-decompress the data in Amazon S3 as it is streamed into
-- the processing container. @Gzip@ can only be used when @Pipe@ mode is
-- specified as the @S3InputMode@. In @Pipe@ mode, Amazon SageMaker streams
-- input data from the source directly to your container without using the
-- EBS volume.
processingS3Input_s3CompressionType :: Lens.Lens' ProcessingS3Input (Prelude.Maybe ProcessingS3CompressionType)
processingS3Input_s3CompressionType :: (Maybe ProcessingS3CompressionType
 -> f (Maybe ProcessingS3CompressionType))
-> ProcessingS3Input -> f ProcessingS3Input
processingS3Input_s3CompressionType = (ProcessingS3Input -> Maybe ProcessingS3CompressionType)
-> (ProcessingS3Input
    -> Maybe ProcessingS3CompressionType -> ProcessingS3Input)
-> Lens
     ProcessingS3Input
     ProcessingS3Input
     (Maybe ProcessingS3CompressionType)
     (Maybe ProcessingS3CompressionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingS3Input' {Maybe ProcessingS3CompressionType
s3CompressionType :: Maybe ProcessingS3CompressionType
$sel:s3CompressionType:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3CompressionType
s3CompressionType} -> Maybe ProcessingS3CompressionType
s3CompressionType) (\s :: ProcessingS3Input
s@ProcessingS3Input' {} Maybe ProcessingS3CompressionType
a -> ProcessingS3Input
s {$sel:s3CompressionType:ProcessingS3Input' :: Maybe ProcessingS3CompressionType
s3CompressionType = Maybe ProcessingS3CompressionType
a} :: ProcessingS3Input)

-- | The URI of the Amazon S3 prefix Amazon SageMaker downloads data required
-- to run a processing job.
processingS3Input_s3Uri :: Lens.Lens' ProcessingS3Input Prelude.Text
processingS3Input_s3Uri :: (Text -> f Text) -> ProcessingS3Input -> f ProcessingS3Input
processingS3Input_s3Uri = (ProcessingS3Input -> Text)
-> (ProcessingS3Input -> Text -> ProcessingS3Input)
-> Lens ProcessingS3Input ProcessingS3Input Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingS3Input' {Text
s3Uri :: Text
$sel:s3Uri:ProcessingS3Input' :: ProcessingS3Input -> Text
s3Uri} -> Text
s3Uri) (\s :: ProcessingS3Input
s@ProcessingS3Input' {} Text
a -> ProcessingS3Input
s {$sel:s3Uri:ProcessingS3Input' :: Text
s3Uri = Text
a} :: ProcessingS3Input)

-- | Whether you use an @S3Prefix@ or a @ManifestFile@ for the data type. If
-- you choose @S3Prefix@, @S3Uri@ identifies a key name prefix. Amazon
-- SageMaker uses all objects with the specified key name prefix for the
-- processing job. If you choose @ManifestFile@, @S3Uri@ identifies an
-- object that is a manifest file containing a list of object keys that you
-- want Amazon SageMaker to use for the processing job.
processingS3Input_s3DataType :: Lens.Lens' ProcessingS3Input ProcessingS3DataType
processingS3Input_s3DataType :: (ProcessingS3DataType -> f ProcessingS3DataType)
-> ProcessingS3Input -> f ProcessingS3Input
processingS3Input_s3DataType = (ProcessingS3Input -> ProcessingS3DataType)
-> (ProcessingS3Input -> ProcessingS3DataType -> ProcessingS3Input)
-> Lens
     ProcessingS3Input
     ProcessingS3Input
     ProcessingS3DataType
     ProcessingS3DataType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingS3Input' {ProcessingS3DataType
s3DataType :: ProcessingS3DataType
$sel:s3DataType:ProcessingS3Input' :: ProcessingS3Input -> ProcessingS3DataType
s3DataType} -> ProcessingS3DataType
s3DataType) (\s :: ProcessingS3Input
s@ProcessingS3Input' {} ProcessingS3DataType
a -> ProcessingS3Input
s {$sel:s3DataType:ProcessingS3Input' :: ProcessingS3DataType
s3DataType = ProcessingS3DataType
a} :: ProcessingS3Input)

instance Core.FromJSON ProcessingS3Input where
  parseJSON :: Value -> Parser ProcessingS3Input
parseJSON =
    String
-> (Object -> Parser ProcessingS3Input)
-> Value
-> Parser ProcessingS3Input
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ProcessingS3Input"
      ( \Object
x ->
          Maybe ProcessingS3DataDistributionType
-> Maybe ProcessingS3InputMode
-> Maybe Text
-> Maybe ProcessingS3CompressionType
-> Text
-> ProcessingS3DataType
-> ProcessingS3Input
ProcessingS3Input'
            (Maybe ProcessingS3DataDistributionType
 -> Maybe ProcessingS3InputMode
 -> Maybe Text
 -> Maybe ProcessingS3CompressionType
 -> Text
 -> ProcessingS3DataType
 -> ProcessingS3Input)
-> Parser (Maybe ProcessingS3DataDistributionType)
-> Parser
     (Maybe ProcessingS3InputMode
      -> Maybe Text
      -> Maybe ProcessingS3CompressionType
      -> Text
      -> ProcessingS3DataType
      -> ProcessingS3Input)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ProcessingS3DataDistributionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3DataDistributionType")
            Parser
  (Maybe ProcessingS3InputMode
   -> Maybe Text
   -> Maybe ProcessingS3CompressionType
   -> Text
   -> ProcessingS3DataType
   -> ProcessingS3Input)
-> Parser (Maybe ProcessingS3InputMode)
-> Parser
     (Maybe Text
      -> Maybe ProcessingS3CompressionType
      -> Text
      -> ProcessingS3DataType
      -> ProcessingS3Input)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProcessingS3InputMode)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3InputMode")
            Parser
  (Maybe Text
   -> Maybe ProcessingS3CompressionType
   -> Text
   -> ProcessingS3DataType
   -> ProcessingS3Input)
-> Parser (Maybe Text)
-> Parser
     (Maybe ProcessingS3CompressionType
      -> Text -> ProcessingS3DataType -> ProcessingS3Input)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LocalPath")
            Parser
  (Maybe ProcessingS3CompressionType
   -> Text -> ProcessingS3DataType -> ProcessingS3Input)
-> Parser (Maybe ProcessingS3CompressionType)
-> Parser (Text -> ProcessingS3DataType -> ProcessingS3Input)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProcessingS3CompressionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"S3CompressionType")
            Parser (Text -> ProcessingS3DataType -> ProcessingS3Input)
-> Parser Text
-> Parser (ProcessingS3DataType -> ProcessingS3Input)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"S3Uri")
            Parser (ProcessingS3DataType -> ProcessingS3Input)
-> Parser ProcessingS3DataType -> Parser ProcessingS3Input
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ProcessingS3DataType
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"S3DataType")
      )

instance Prelude.Hashable ProcessingS3Input

instance Prelude.NFData ProcessingS3Input

instance Core.ToJSON ProcessingS3Input where
  toJSON :: ProcessingS3Input -> Value
toJSON ProcessingS3Input' {Maybe Text
Maybe ProcessingS3CompressionType
Maybe ProcessingS3DataDistributionType
Maybe ProcessingS3InputMode
Text
ProcessingS3DataType
s3DataType :: ProcessingS3DataType
s3Uri :: Text
s3CompressionType :: Maybe ProcessingS3CompressionType
localPath :: Maybe Text
s3InputMode :: Maybe ProcessingS3InputMode
s3DataDistributionType :: Maybe ProcessingS3DataDistributionType
$sel:s3DataType:ProcessingS3Input' :: ProcessingS3Input -> ProcessingS3DataType
$sel:s3Uri:ProcessingS3Input' :: ProcessingS3Input -> Text
$sel:s3CompressionType:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3CompressionType
$sel:localPath:ProcessingS3Input' :: ProcessingS3Input -> Maybe Text
$sel:s3InputMode:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3InputMode
$sel:s3DataDistributionType:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3DataDistributionType
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"S3DataDistributionType" Text -> ProcessingS3DataDistributionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ProcessingS3DataDistributionType -> Pair)
-> Maybe ProcessingS3DataDistributionType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingS3DataDistributionType
s3DataDistributionType,
            (Text
"S3InputMode" Text -> ProcessingS3InputMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ProcessingS3InputMode -> Pair)
-> Maybe ProcessingS3InputMode -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingS3InputMode
s3InputMode,
            (Text
"LocalPath" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
localPath,
            (Text
"S3CompressionType" Text -> ProcessingS3CompressionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (ProcessingS3CompressionType -> Pair)
-> Maybe ProcessingS3CompressionType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingS3CompressionType
s3CompressionType,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"S3Uri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
s3Uri),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"S3DataType" Text -> ProcessingS3DataType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ProcessingS3DataType
s3DataType)
          ]
      )