{-# 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.ProcessingS3Output where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.ProcessingS3UploadMode
data ProcessingS3Output = ProcessingS3Output'
{
ProcessingS3Output -> Text
s3Uri :: Prelude.Text,
ProcessingS3Output -> Text
localPath :: Prelude.Text,
ProcessingS3Output -> ProcessingS3UploadMode
s3UploadMode :: ProcessingS3UploadMode
}
deriving (ProcessingS3Output -> ProcessingS3Output -> Bool
(ProcessingS3Output -> ProcessingS3Output -> Bool)
-> (ProcessingS3Output -> ProcessingS3Output -> Bool)
-> Eq ProcessingS3Output
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProcessingS3Output -> ProcessingS3Output -> Bool
$c/= :: ProcessingS3Output -> ProcessingS3Output -> Bool
== :: ProcessingS3Output -> ProcessingS3Output -> Bool
$c== :: ProcessingS3Output -> ProcessingS3Output -> Bool
Prelude.Eq, ReadPrec [ProcessingS3Output]
ReadPrec ProcessingS3Output
Int -> ReadS ProcessingS3Output
ReadS [ProcessingS3Output]
(Int -> ReadS ProcessingS3Output)
-> ReadS [ProcessingS3Output]
-> ReadPrec ProcessingS3Output
-> ReadPrec [ProcessingS3Output]
-> Read ProcessingS3Output
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ProcessingS3Output]
$creadListPrec :: ReadPrec [ProcessingS3Output]
readPrec :: ReadPrec ProcessingS3Output
$creadPrec :: ReadPrec ProcessingS3Output
readList :: ReadS [ProcessingS3Output]
$creadList :: ReadS [ProcessingS3Output]
readsPrec :: Int -> ReadS ProcessingS3Output
$creadsPrec :: Int -> ReadS ProcessingS3Output
Prelude.Read, Int -> ProcessingS3Output -> ShowS
[ProcessingS3Output] -> ShowS
ProcessingS3Output -> String
(Int -> ProcessingS3Output -> ShowS)
-> (ProcessingS3Output -> String)
-> ([ProcessingS3Output] -> ShowS)
-> Show ProcessingS3Output
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ProcessingS3Output] -> ShowS
$cshowList :: [ProcessingS3Output] -> ShowS
show :: ProcessingS3Output -> String
$cshow :: ProcessingS3Output -> String
showsPrec :: Int -> ProcessingS3Output -> ShowS
$cshowsPrec :: Int -> ProcessingS3Output -> ShowS
Prelude.Show, (forall x. ProcessingS3Output -> Rep ProcessingS3Output x)
-> (forall x. Rep ProcessingS3Output x -> ProcessingS3Output)
-> Generic ProcessingS3Output
forall x. Rep ProcessingS3Output x -> ProcessingS3Output
forall x. ProcessingS3Output -> Rep ProcessingS3Output x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ProcessingS3Output x -> ProcessingS3Output
$cfrom :: forall x. ProcessingS3Output -> Rep ProcessingS3Output x
Prelude.Generic)
newProcessingS3Output ::
Prelude.Text ->
Prelude.Text ->
ProcessingS3UploadMode ->
ProcessingS3Output
newProcessingS3Output :: Text -> Text -> ProcessingS3UploadMode -> ProcessingS3Output
newProcessingS3Output
Text
pS3Uri_
Text
pLocalPath_
ProcessingS3UploadMode
pS3UploadMode_ =
ProcessingS3Output' :: Text -> Text -> ProcessingS3UploadMode -> ProcessingS3Output
ProcessingS3Output'
{ $sel:s3Uri:ProcessingS3Output' :: Text
s3Uri = Text
pS3Uri_,
$sel:localPath:ProcessingS3Output' :: Text
localPath = Text
pLocalPath_,
$sel:s3UploadMode:ProcessingS3Output' :: ProcessingS3UploadMode
s3UploadMode = ProcessingS3UploadMode
pS3UploadMode_
}
processingS3Output_s3Uri :: Lens.Lens' ProcessingS3Output Prelude.Text
processingS3Output_s3Uri :: (Text -> f Text) -> ProcessingS3Output -> f ProcessingS3Output
processingS3Output_s3Uri = (ProcessingS3Output -> Text)
-> (ProcessingS3Output -> Text -> ProcessingS3Output)
-> Lens ProcessingS3Output ProcessingS3Output Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingS3Output' {Text
s3Uri :: Text
$sel:s3Uri:ProcessingS3Output' :: ProcessingS3Output -> Text
s3Uri} -> Text
s3Uri) (\s :: ProcessingS3Output
s@ProcessingS3Output' {} Text
a -> ProcessingS3Output
s {$sel:s3Uri:ProcessingS3Output' :: Text
s3Uri = Text
a} :: ProcessingS3Output)
processingS3Output_localPath :: Lens.Lens' ProcessingS3Output Prelude.Text
processingS3Output_localPath :: (Text -> f Text) -> ProcessingS3Output -> f ProcessingS3Output
processingS3Output_localPath = (ProcessingS3Output -> Text)
-> (ProcessingS3Output -> Text -> ProcessingS3Output)
-> Lens ProcessingS3Output ProcessingS3Output Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingS3Output' {Text
localPath :: Text
$sel:localPath:ProcessingS3Output' :: ProcessingS3Output -> Text
localPath} -> Text
localPath) (\s :: ProcessingS3Output
s@ProcessingS3Output' {} Text
a -> ProcessingS3Output
s {$sel:localPath:ProcessingS3Output' :: Text
localPath = Text
a} :: ProcessingS3Output)
processingS3Output_s3UploadMode :: Lens.Lens' ProcessingS3Output ProcessingS3UploadMode
processingS3Output_s3UploadMode :: (ProcessingS3UploadMode -> f ProcessingS3UploadMode)
-> ProcessingS3Output -> f ProcessingS3Output
processingS3Output_s3UploadMode = (ProcessingS3Output -> ProcessingS3UploadMode)
-> (ProcessingS3Output
-> ProcessingS3UploadMode -> ProcessingS3Output)
-> Lens
ProcessingS3Output
ProcessingS3Output
ProcessingS3UploadMode
ProcessingS3UploadMode
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ProcessingS3Output' {ProcessingS3UploadMode
s3UploadMode :: ProcessingS3UploadMode
$sel:s3UploadMode:ProcessingS3Output' :: ProcessingS3Output -> ProcessingS3UploadMode
s3UploadMode} -> ProcessingS3UploadMode
s3UploadMode) (\s :: ProcessingS3Output
s@ProcessingS3Output' {} ProcessingS3UploadMode
a -> ProcessingS3Output
s {$sel:s3UploadMode:ProcessingS3Output' :: ProcessingS3UploadMode
s3UploadMode = ProcessingS3UploadMode
a} :: ProcessingS3Output)
instance Core.FromJSON ProcessingS3Output where
parseJSON :: Value -> Parser ProcessingS3Output
parseJSON =
String
-> (Object -> Parser ProcessingS3Output)
-> Value
-> Parser ProcessingS3Output
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ProcessingS3Output"
( \Object
x ->
Text -> Text -> ProcessingS3UploadMode -> ProcessingS3Output
ProcessingS3Output'
(Text -> Text -> ProcessingS3UploadMode -> ProcessingS3Output)
-> Parser Text
-> Parser (Text -> ProcessingS3UploadMode -> ProcessingS3Output)
forall (f :: * -> *) a b. Functor 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 (Text -> ProcessingS3UploadMode -> ProcessingS3Output)
-> Parser Text
-> Parser (ProcessingS3UploadMode -> ProcessingS3Output)
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
"LocalPath")
Parser (ProcessingS3UploadMode -> ProcessingS3Output)
-> Parser ProcessingS3UploadMode -> Parser ProcessingS3Output
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser ProcessingS3UploadMode
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"S3UploadMode")
)
instance Prelude.Hashable ProcessingS3Output
instance Prelude.NFData ProcessingS3Output
instance Core.ToJSON ProcessingS3Output where
toJSON :: ProcessingS3Output -> Value
toJSON ProcessingS3Output' {Text
ProcessingS3UploadMode
s3UploadMode :: ProcessingS3UploadMode
localPath :: Text
s3Uri :: Text
$sel:s3UploadMode:ProcessingS3Output' :: ProcessingS3Output -> ProcessingS3UploadMode
$sel:localPath:ProcessingS3Output' :: ProcessingS3Output -> Text
$sel:s3Uri:ProcessingS3Output' :: ProcessingS3Output -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ 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
"LocalPath" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
localPath),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"S3UploadMode" Text -> ProcessingS3UploadMode -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ProcessingS3UploadMode
s3UploadMode)
]
)