{-# 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.TransformOutput 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.AssemblyType
data TransformOutput = TransformOutput'
{
TransformOutput -> Maybe Text
accept :: Prelude.Maybe Prelude.Text,
TransformOutput -> Maybe AssemblyType
assembleWith :: Prelude.Maybe AssemblyType,
TransformOutput -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
TransformOutput -> Text
s3OutputPath :: Prelude.Text
}
deriving (TransformOutput -> TransformOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransformOutput -> TransformOutput -> Bool
$c/= :: TransformOutput -> TransformOutput -> Bool
== :: TransformOutput -> TransformOutput -> Bool
$c== :: TransformOutput -> TransformOutput -> Bool
Prelude.Eq, ReadPrec [TransformOutput]
ReadPrec TransformOutput
Int -> ReadS TransformOutput
ReadS [TransformOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TransformOutput]
$creadListPrec :: ReadPrec [TransformOutput]
readPrec :: ReadPrec TransformOutput
$creadPrec :: ReadPrec TransformOutput
readList :: ReadS [TransformOutput]
$creadList :: ReadS [TransformOutput]
readsPrec :: Int -> ReadS TransformOutput
$creadsPrec :: Int -> ReadS TransformOutput
Prelude.Read, Int -> TransformOutput -> ShowS
[TransformOutput] -> ShowS
TransformOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransformOutput] -> ShowS
$cshowList :: [TransformOutput] -> ShowS
show :: TransformOutput -> String
$cshow :: TransformOutput -> String
showsPrec :: Int -> TransformOutput -> ShowS
$cshowsPrec :: Int -> TransformOutput -> ShowS
Prelude.Show, forall x. Rep TransformOutput x -> TransformOutput
forall x. TransformOutput -> Rep TransformOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TransformOutput x -> TransformOutput
$cfrom :: forall x. TransformOutput -> Rep TransformOutput x
Prelude.Generic)
newTransformOutput ::
Prelude.Text ->
TransformOutput
newTransformOutput :: Text -> TransformOutput
newTransformOutput Text
pS3OutputPath_ =
TransformOutput'
{ $sel:accept:TransformOutput' :: Maybe Text
accept = forall a. Maybe a
Prelude.Nothing,
$sel:assembleWith:TransformOutput' :: Maybe AssemblyType
assembleWith = forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyId:TransformOutput' :: Maybe Text
kmsKeyId = forall a. Maybe a
Prelude.Nothing,
$sel:s3OutputPath:TransformOutput' :: Text
s3OutputPath = Text
pS3OutputPath_
}
transformOutput_accept :: Lens.Lens' TransformOutput (Prelude.Maybe Prelude.Text)
transformOutput_accept :: Lens' TransformOutput (Maybe Text)
transformOutput_accept = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransformOutput' {Maybe Text
accept :: Maybe Text
$sel:accept:TransformOutput' :: TransformOutput -> Maybe Text
accept} -> Maybe Text
accept) (\s :: TransformOutput
s@TransformOutput' {} Maybe Text
a -> TransformOutput
s {$sel:accept:TransformOutput' :: Maybe Text
accept = Maybe Text
a} :: TransformOutput)
transformOutput_assembleWith :: Lens.Lens' TransformOutput (Prelude.Maybe AssemblyType)
transformOutput_assembleWith :: Lens' TransformOutput (Maybe AssemblyType)
transformOutput_assembleWith = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransformOutput' {Maybe AssemblyType
assembleWith :: Maybe AssemblyType
$sel:assembleWith:TransformOutput' :: TransformOutput -> Maybe AssemblyType
assembleWith} -> Maybe AssemblyType
assembleWith) (\s :: TransformOutput
s@TransformOutput' {} Maybe AssemblyType
a -> TransformOutput
s {$sel:assembleWith:TransformOutput' :: Maybe AssemblyType
assembleWith = Maybe AssemblyType
a} :: TransformOutput)
transformOutput_kmsKeyId :: Lens.Lens' TransformOutput (Prelude.Maybe Prelude.Text)
transformOutput_kmsKeyId :: Lens' TransformOutput (Maybe Text)
transformOutput_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransformOutput' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:TransformOutput' :: TransformOutput -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: TransformOutput
s@TransformOutput' {} Maybe Text
a -> TransformOutput
s {$sel:kmsKeyId:TransformOutput' :: Maybe Text
kmsKeyId = Maybe Text
a} :: TransformOutput)
transformOutput_s3OutputPath :: Lens.Lens' TransformOutput Prelude.Text
transformOutput_s3OutputPath :: Lens' TransformOutput Text
transformOutput_s3OutputPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransformOutput' {Text
s3OutputPath :: Text
$sel:s3OutputPath:TransformOutput' :: TransformOutput -> Text
s3OutputPath} -> Text
s3OutputPath) (\s :: TransformOutput
s@TransformOutput' {} Text
a -> TransformOutput
s {$sel:s3OutputPath:TransformOutput' :: Text
s3OutputPath = Text
a} :: TransformOutput)
instance Data.FromJSON TransformOutput where
parseJSON :: Value -> Parser TransformOutput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"TransformOutput"
( \Object
x ->
Maybe Text
-> Maybe AssemblyType -> Maybe Text -> Text -> TransformOutput
TransformOutput'
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
"Accept")
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
"AssembleWith")
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
"KmsKeyId")
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
"S3OutputPath")
)
instance Prelude.Hashable TransformOutput where
hashWithSalt :: Int -> TransformOutput -> Int
hashWithSalt Int
_salt TransformOutput' {Maybe Text
Maybe AssemblyType
Text
s3OutputPath :: Text
kmsKeyId :: Maybe Text
assembleWith :: Maybe AssemblyType
accept :: Maybe Text
$sel:s3OutputPath:TransformOutput' :: TransformOutput -> Text
$sel:kmsKeyId:TransformOutput' :: TransformOutput -> Maybe Text
$sel:assembleWith:TransformOutput' :: TransformOutput -> Maybe AssemblyType
$sel:accept:TransformOutput' :: TransformOutput -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
accept
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe AssemblyType
assembleWith
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKeyId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
s3OutputPath
instance Prelude.NFData TransformOutput where
rnf :: TransformOutput -> ()
rnf TransformOutput' {Maybe Text
Maybe AssemblyType
Text
s3OutputPath :: Text
kmsKeyId :: Maybe Text
assembleWith :: Maybe AssemblyType
accept :: Maybe Text
$sel:s3OutputPath:TransformOutput' :: TransformOutput -> Text
$sel:kmsKeyId:TransformOutput' :: TransformOutput -> Maybe Text
$sel:assembleWith:TransformOutput' :: TransformOutput -> Maybe AssemblyType
$sel:accept:TransformOutput' :: TransformOutput -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
accept
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe AssemblyType
assembleWith
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
s3OutputPath
instance Data.ToJSON TransformOutput where
toJSON :: TransformOutput -> Value
toJSON TransformOutput' {Maybe Text
Maybe AssemblyType
Text
s3OutputPath :: Text
kmsKeyId :: Maybe Text
assembleWith :: Maybe AssemblyType
accept :: Maybe Text
$sel:s3OutputPath:TransformOutput' :: TransformOutput -> Text
$sel:kmsKeyId:TransformOutput' :: TransformOutput -> Maybe Text
$sel:assembleWith:TransformOutput' :: TransformOutput -> Maybe AssemblyType
$sel:accept:TransformOutput' :: TransformOutput -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Accept" 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
accept,
(Key
"AssembleWith" 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 AssemblyType
assembleWith,
(Key
"KmsKeyId" 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
kmsKeyId,
forall a. a -> Maybe a
Prelude.Just (Key
"S3OutputPath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
s3OutputPath)
]
)