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