{-# 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.TransformDataSource where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.TransformS3DataSource
data TransformDataSource = TransformDataSource'
{
TransformDataSource -> TransformS3DataSource
s3DataSource :: TransformS3DataSource
}
deriving (TransformDataSource -> TransformDataSource -> Bool
(TransformDataSource -> TransformDataSource -> Bool)
-> (TransformDataSource -> TransformDataSource -> Bool)
-> Eq TransformDataSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TransformDataSource -> TransformDataSource -> Bool
$c/= :: TransformDataSource -> TransformDataSource -> Bool
== :: TransformDataSource -> TransformDataSource -> Bool
$c== :: TransformDataSource -> TransformDataSource -> Bool
Prelude.Eq, ReadPrec [TransformDataSource]
ReadPrec TransformDataSource
Int -> ReadS TransformDataSource
ReadS [TransformDataSource]
(Int -> ReadS TransformDataSource)
-> ReadS [TransformDataSource]
-> ReadPrec TransformDataSource
-> ReadPrec [TransformDataSource]
-> Read TransformDataSource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TransformDataSource]
$creadListPrec :: ReadPrec [TransformDataSource]
readPrec :: ReadPrec TransformDataSource
$creadPrec :: ReadPrec TransformDataSource
readList :: ReadS [TransformDataSource]
$creadList :: ReadS [TransformDataSource]
readsPrec :: Int -> ReadS TransformDataSource
$creadsPrec :: Int -> ReadS TransformDataSource
Prelude.Read, Int -> TransformDataSource -> ShowS
[TransformDataSource] -> ShowS
TransformDataSource -> String
(Int -> TransformDataSource -> ShowS)
-> (TransformDataSource -> String)
-> ([TransformDataSource] -> ShowS)
-> Show TransformDataSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TransformDataSource] -> ShowS
$cshowList :: [TransformDataSource] -> ShowS
show :: TransformDataSource -> String
$cshow :: TransformDataSource -> String
showsPrec :: Int -> TransformDataSource -> ShowS
$cshowsPrec :: Int -> TransformDataSource -> ShowS
Prelude.Show, (forall x. TransformDataSource -> Rep TransformDataSource x)
-> (forall x. Rep TransformDataSource x -> TransformDataSource)
-> Generic TransformDataSource
forall x. Rep TransformDataSource x -> TransformDataSource
forall x. TransformDataSource -> Rep TransformDataSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TransformDataSource x -> TransformDataSource
$cfrom :: forall x. TransformDataSource -> Rep TransformDataSource x
Prelude.Generic)
newTransformDataSource ::
TransformS3DataSource ->
TransformDataSource
newTransformDataSource :: TransformS3DataSource -> TransformDataSource
newTransformDataSource TransformS3DataSource
pS3DataSource_ =
TransformDataSource' :: TransformS3DataSource -> TransformDataSource
TransformDataSource' {$sel:s3DataSource:TransformDataSource' :: TransformS3DataSource
s3DataSource = TransformS3DataSource
pS3DataSource_}
transformDataSource_s3DataSource :: Lens.Lens' TransformDataSource TransformS3DataSource
transformDataSource_s3DataSource :: (TransformS3DataSource -> f TransformS3DataSource)
-> TransformDataSource -> f TransformDataSource
transformDataSource_s3DataSource = (TransformDataSource -> TransformS3DataSource)
-> (TransformDataSource
-> TransformS3DataSource -> TransformDataSource)
-> Lens
TransformDataSource
TransformDataSource
TransformS3DataSource
TransformS3DataSource
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TransformDataSource' {TransformS3DataSource
s3DataSource :: TransformS3DataSource
$sel:s3DataSource:TransformDataSource' :: TransformDataSource -> TransformS3DataSource
s3DataSource} -> TransformS3DataSource
s3DataSource) (\s :: TransformDataSource
s@TransformDataSource' {} TransformS3DataSource
a -> TransformDataSource
s {$sel:s3DataSource:TransformDataSource' :: TransformS3DataSource
s3DataSource = TransformS3DataSource
a} :: TransformDataSource)
instance Core.FromJSON TransformDataSource where
parseJSON :: Value -> Parser TransformDataSource
parseJSON =
String
-> (Object -> Parser TransformDataSource)
-> Value
-> Parser TransformDataSource
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"TransformDataSource"
( \Object
x ->
TransformS3DataSource -> TransformDataSource
TransformDataSource'
(TransformS3DataSource -> TransformDataSource)
-> Parser TransformS3DataSource -> Parser TransformDataSource
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser TransformS3DataSource
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"S3DataSource")
)
instance Prelude.Hashable TransformDataSource
instance Prelude.NFData TransformDataSource
instance Core.ToJSON TransformDataSource where
toJSON :: TransformDataSource -> Value
toJSON TransformDataSource' {TransformS3DataSource
s3DataSource :: TransformS3DataSource
$sel:s3DataSource:TransformDataSource' :: TransformDataSource -> TransformS3DataSource
..} =
[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
"S3DataSource" Text -> TransformS3DataSource -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= TransformS3DataSource
s3DataSource)]
)