{-# 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 #-}
module Amazonka.SageMaker.Types.ProcessingS3Input where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
data ProcessingS3Input = ProcessingS3Input'
{
ProcessingS3Input -> Maybe Text
localPath :: Prelude.Maybe Prelude.Text,
ProcessingS3Input -> Maybe ProcessingS3CompressionType
s3CompressionType :: Prelude.Maybe ProcessingS3CompressionType,
ProcessingS3Input -> Maybe ProcessingS3DataDistributionType
s3DataDistributionType :: Prelude.Maybe ProcessingS3DataDistributionType,
ProcessingS3Input -> Maybe ProcessingS3InputMode
s3InputMode :: Prelude.Maybe ProcessingS3InputMode,
ProcessingS3Input -> Text
s3Uri :: Prelude.Text,
ProcessingS3Input -> ProcessingS3DataType
s3DataType :: ProcessingS3DataType
}
deriving (ProcessingS3Input -> ProcessingS3Input -> Bool
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]
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
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. 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)
newProcessingS3Input ::
Prelude.Text ->
ProcessingS3DataType ->
ProcessingS3Input
newProcessingS3Input :: Text -> ProcessingS3DataType -> ProcessingS3Input
newProcessingS3Input Text
pS3Uri_ ProcessingS3DataType
pS3DataType_ =
ProcessingS3Input'
{ $sel:localPath:ProcessingS3Input' :: Maybe Text
localPath = forall a. Maybe a
Prelude.Nothing,
$sel:s3CompressionType:ProcessingS3Input' :: Maybe ProcessingS3CompressionType
s3CompressionType = forall a. Maybe a
Prelude.Nothing,
$sel:s3DataDistributionType:ProcessingS3Input' :: Maybe ProcessingS3DataDistributionType
s3DataDistributionType = forall a. Maybe a
Prelude.Nothing,
$sel:s3InputMode:ProcessingS3Input' :: Maybe ProcessingS3InputMode
s3InputMode = forall a. Maybe a
Prelude.Nothing,
$sel:s3Uri:ProcessingS3Input' :: Text
s3Uri = Text
pS3Uri_,
$sel:s3DataType:ProcessingS3Input' :: ProcessingS3DataType
s3DataType = ProcessingS3DataType
pS3DataType_
}
processingS3Input_localPath :: Lens.Lens' ProcessingS3Input (Prelude.Maybe Prelude.Text)
processingS3Input_localPath :: Lens' ProcessingS3Input (Maybe Text)
processingS3Input_localPath = 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)
processingS3Input_s3CompressionType :: Lens.Lens' ProcessingS3Input (Prelude.Maybe ProcessingS3CompressionType)
processingS3Input_s3CompressionType :: Lens' ProcessingS3Input (Maybe ProcessingS3CompressionType)
processingS3Input_s3CompressionType = 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)
processingS3Input_s3DataDistributionType :: Lens.Lens' ProcessingS3Input (Prelude.Maybe ProcessingS3DataDistributionType)
processingS3Input_s3DataDistributionType :: Lens' ProcessingS3Input (Maybe ProcessingS3DataDistributionType)
processingS3Input_s3DataDistributionType = 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)
processingS3Input_s3InputMode :: Lens.Lens' ProcessingS3Input (Prelude.Maybe ProcessingS3InputMode)
processingS3Input_s3InputMode :: Lens' ProcessingS3Input (Maybe ProcessingS3InputMode)
processingS3Input_s3InputMode = 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)
processingS3Input_s3Uri :: Lens.Lens' ProcessingS3Input Prelude.Text
processingS3Input_s3Uri :: Lens' ProcessingS3Input Text
processingS3Input_s3Uri = 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)
processingS3Input_s3DataType :: Lens.Lens' ProcessingS3Input ProcessingS3DataType
processingS3Input_s3DataType :: Lens' ProcessingS3Input ProcessingS3DataType
processingS3Input_s3DataType = 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 Data.FromJSON ProcessingS3Input where
parseJSON :: Value -> Parser ProcessingS3Input
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"ProcessingS3Input"
( \Object
x ->
Maybe Text
-> Maybe ProcessingS3CompressionType
-> Maybe ProcessingS3DataDistributionType
-> Maybe ProcessingS3InputMode
-> Text
-> ProcessingS3DataType
-> ProcessingS3Input
ProcessingS3Input'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LocalPath")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"S3CompressionType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"S3DataDistributionType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"S3InputMode")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"S3Uri")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"S3DataType")
)
instance Prelude.Hashable ProcessingS3Input where
hashWithSalt :: Int -> ProcessingS3Input -> Int
hashWithSalt Int
_salt ProcessingS3Input' {Maybe Text
Maybe ProcessingS3CompressionType
Maybe ProcessingS3DataDistributionType
Maybe ProcessingS3InputMode
Text
ProcessingS3DataType
s3DataType :: ProcessingS3DataType
s3Uri :: Text
s3InputMode :: Maybe ProcessingS3InputMode
s3DataDistributionType :: Maybe ProcessingS3DataDistributionType
s3CompressionType :: Maybe ProcessingS3CompressionType
localPath :: Maybe Text
$sel:s3DataType:ProcessingS3Input' :: ProcessingS3Input -> ProcessingS3DataType
$sel:s3Uri:ProcessingS3Input' :: ProcessingS3Input -> Text
$sel:s3InputMode:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3InputMode
$sel:s3DataDistributionType:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3DataDistributionType
$sel:s3CompressionType:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3CompressionType
$sel:localPath:ProcessingS3Input' :: ProcessingS3Input -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
localPath
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProcessingS3CompressionType
s3CompressionType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProcessingS3DataDistributionType
s3DataDistributionType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProcessingS3InputMode
s3InputMode
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
s3Uri
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ProcessingS3DataType
s3DataType
instance Prelude.NFData ProcessingS3Input where
rnf :: ProcessingS3Input -> ()
rnf ProcessingS3Input' {Maybe Text
Maybe ProcessingS3CompressionType
Maybe ProcessingS3DataDistributionType
Maybe ProcessingS3InputMode
Text
ProcessingS3DataType
s3DataType :: ProcessingS3DataType
s3Uri :: Text
s3InputMode :: Maybe ProcessingS3InputMode
s3DataDistributionType :: Maybe ProcessingS3DataDistributionType
s3CompressionType :: Maybe ProcessingS3CompressionType
localPath :: Maybe Text
$sel:s3DataType:ProcessingS3Input' :: ProcessingS3Input -> ProcessingS3DataType
$sel:s3Uri:ProcessingS3Input' :: ProcessingS3Input -> Text
$sel:s3InputMode:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3InputMode
$sel:s3DataDistributionType:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3DataDistributionType
$sel:s3CompressionType:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3CompressionType
$sel:localPath:ProcessingS3Input' :: ProcessingS3Input -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
localPath
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProcessingS3CompressionType
s3CompressionType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProcessingS3DataDistributionType
s3DataDistributionType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProcessingS3InputMode
s3InputMode
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
s3Uri
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ProcessingS3DataType
s3DataType
instance Data.ToJSON ProcessingS3Input where
toJSON :: ProcessingS3Input -> Value
toJSON ProcessingS3Input' {Maybe Text
Maybe ProcessingS3CompressionType
Maybe ProcessingS3DataDistributionType
Maybe ProcessingS3InputMode
Text
ProcessingS3DataType
s3DataType :: ProcessingS3DataType
s3Uri :: Text
s3InputMode :: Maybe ProcessingS3InputMode
s3DataDistributionType :: Maybe ProcessingS3DataDistributionType
s3CompressionType :: Maybe ProcessingS3CompressionType
localPath :: Maybe Text
$sel:s3DataType:ProcessingS3Input' :: ProcessingS3Input -> ProcessingS3DataType
$sel:s3Uri:ProcessingS3Input' :: ProcessingS3Input -> Text
$sel:s3InputMode:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3InputMode
$sel:s3DataDistributionType:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3DataDistributionType
$sel:s3CompressionType:ProcessingS3Input' :: ProcessingS3Input -> Maybe ProcessingS3CompressionType
$sel:localPath:ProcessingS3Input' :: ProcessingS3Input -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"LocalPath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
localPath,
(Key
"S3CompressionType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingS3CompressionType
s3CompressionType,
(Key
"S3DataDistributionType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingS3DataDistributionType
s3DataDistributionType,
(Key
"S3InputMode" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProcessingS3InputMode
s3InputMode,
forall a. a -> Maybe a
Prelude.Just (Key
"S3Uri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
s3Uri),
forall a. a -> Maybe a
Prelude.Just (Key
"S3DataType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= ProcessingS3DataType
s3DataType)
]
)