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