{-# 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.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
data ProcessingS3Input = ProcessingS3Input'
{
ProcessingS3Input -> Maybe ProcessingS3DataDistributionType
s3DataDistributionType :: Prelude.Maybe ProcessingS3DataDistributionType,
ProcessingS3Input -> Maybe ProcessingS3InputMode
s3InputMode :: Prelude.Maybe ProcessingS3InputMode,
ProcessingS3Input -> Maybe Text
localPath :: Prelude.Maybe Prelude.Text,
ProcessingS3Input -> Maybe ProcessingS3CompressionType
s3CompressionType :: Prelude.Maybe ProcessingS3CompressionType,
ProcessingS3Input -> Text
s3Uri :: Prelude.Text,
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)
newProcessingS3Input ::
Prelude.Text ->
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_
}
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)
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)
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)
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)
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)
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)
]
)