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