{-# 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.DataExchange.Types.ImportAssetsFromS3RequestDetails where
import qualified Amazonka.Core as Core
import Amazonka.DataExchange.Types.AssetSourceEntry
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ImportAssetsFromS3RequestDetails = ImportAssetsFromS3RequestDetails'
{
ImportAssetsFromS3RequestDetails -> Text
dataSetId :: Prelude.Text,
ImportAssetsFromS3RequestDetails -> [AssetSourceEntry]
assetSources :: [AssetSourceEntry],
ImportAssetsFromS3RequestDetails -> Text
revisionId :: Prelude.Text
}
deriving (ImportAssetsFromS3RequestDetails
-> ImportAssetsFromS3RequestDetails -> Bool
(ImportAssetsFromS3RequestDetails
-> ImportAssetsFromS3RequestDetails -> Bool)
-> (ImportAssetsFromS3RequestDetails
-> ImportAssetsFromS3RequestDetails -> Bool)
-> Eq ImportAssetsFromS3RequestDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportAssetsFromS3RequestDetails
-> ImportAssetsFromS3RequestDetails -> Bool
$c/= :: ImportAssetsFromS3RequestDetails
-> ImportAssetsFromS3RequestDetails -> Bool
== :: ImportAssetsFromS3RequestDetails
-> ImportAssetsFromS3RequestDetails -> Bool
$c== :: ImportAssetsFromS3RequestDetails
-> ImportAssetsFromS3RequestDetails -> Bool
Prelude.Eq, ReadPrec [ImportAssetsFromS3RequestDetails]
ReadPrec ImportAssetsFromS3RequestDetails
Int -> ReadS ImportAssetsFromS3RequestDetails
ReadS [ImportAssetsFromS3RequestDetails]
(Int -> ReadS ImportAssetsFromS3RequestDetails)
-> ReadS [ImportAssetsFromS3RequestDetails]
-> ReadPrec ImportAssetsFromS3RequestDetails
-> ReadPrec [ImportAssetsFromS3RequestDetails]
-> Read ImportAssetsFromS3RequestDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportAssetsFromS3RequestDetails]
$creadListPrec :: ReadPrec [ImportAssetsFromS3RequestDetails]
readPrec :: ReadPrec ImportAssetsFromS3RequestDetails
$creadPrec :: ReadPrec ImportAssetsFromS3RequestDetails
readList :: ReadS [ImportAssetsFromS3RequestDetails]
$creadList :: ReadS [ImportAssetsFromS3RequestDetails]
readsPrec :: Int -> ReadS ImportAssetsFromS3RequestDetails
$creadsPrec :: Int -> ReadS ImportAssetsFromS3RequestDetails
Prelude.Read, Int -> ImportAssetsFromS3RequestDetails -> ShowS
[ImportAssetsFromS3RequestDetails] -> ShowS
ImportAssetsFromS3RequestDetails -> String
(Int -> ImportAssetsFromS3RequestDetails -> ShowS)
-> (ImportAssetsFromS3RequestDetails -> String)
-> ([ImportAssetsFromS3RequestDetails] -> ShowS)
-> Show ImportAssetsFromS3RequestDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportAssetsFromS3RequestDetails] -> ShowS
$cshowList :: [ImportAssetsFromS3RequestDetails] -> ShowS
show :: ImportAssetsFromS3RequestDetails -> String
$cshow :: ImportAssetsFromS3RequestDetails -> String
showsPrec :: Int -> ImportAssetsFromS3RequestDetails -> ShowS
$cshowsPrec :: Int -> ImportAssetsFromS3RequestDetails -> ShowS
Prelude.Show, (forall x.
ImportAssetsFromS3RequestDetails
-> Rep ImportAssetsFromS3RequestDetails x)
-> (forall x.
Rep ImportAssetsFromS3RequestDetails x
-> ImportAssetsFromS3RequestDetails)
-> Generic ImportAssetsFromS3RequestDetails
forall x.
Rep ImportAssetsFromS3RequestDetails x
-> ImportAssetsFromS3RequestDetails
forall x.
ImportAssetsFromS3RequestDetails
-> Rep ImportAssetsFromS3RequestDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ImportAssetsFromS3RequestDetails x
-> ImportAssetsFromS3RequestDetails
$cfrom :: forall x.
ImportAssetsFromS3RequestDetails
-> Rep ImportAssetsFromS3RequestDetails x
Prelude.Generic)
newImportAssetsFromS3RequestDetails ::
Prelude.Text ->
Prelude.Text ->
ImportAssetsFromS3RequestDetails
newImportAssetsFromS3RequestDetails :: Text -> Text -> ImportAssetsFromS3RequestDetails
newImportAssetsFromS3RequestDetails
Text
pDataSetId_
Text
pRevisionId_ =
ImportAssetsFromS3RequestDetails' :: Text
-> [AssetSourceEntry] -> Text -> ImportAssetsFromS3RequestDetails
ImportAssetsFromS3RequestDetails'
{ $sel:dataSetId:ImportAssetsFromS3RequestDetails' :: Text
dataSetId =
Text
pDataSetId_,
$sel:assetSources:ImportAssetsFromS3RequestDetails' :: [AssetSourceEntry]
assetSources = [AssetSourceEntry]
forall a. Monoid a => a
Prelude.mempty,
$sel:revisionId:ImportAssetsFromS3RequestDetails' :: Text
revisionId = Text
pRevisionId_
}
importAssetsFromS3RequestDetails_dataSetId :: Lens.Lens' ImportAssetsFromS3RequestDetails Prelude.Text
importAssetsFromS3RequestDetails_dataSetId :: (Text -> f Text)
-> ImportAssetsFromS3RequestDetails
-> f ImportAssetsFromS3RequestDetails
importAssetsFromS3RequestDetails_dataSetId = (ImportAssetsFromS3RequestDetails -> Text)
-> (ImportAssetsFromS3RequestDetails
-> Text -> ImportAssetsFromS3RequestDetails)
-> Lens
ImportAssetsFromS3RequestDetails
ImportAssetsFromS3RequestDetails
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportAssetsFromS3RequestDetails' {Text
dataSetId :: Text
$sel:dataSetId:ImportAssetsFromS3RequestDetails' :: ImportAssetsFromS3RequestDetails -> Text
dataSetId} -> Text
dataSetId) (\s :: ImportAssetsFromS3RequestDetails
s@ImportAssetsFromS3RequestDetails' {} Text
a -> ImportAssetsFromS3RequestDetails
s {$sel:dataSetId:ImportAssetsFromS3RequestDetails' :: Text
dataSetId = Text
a} :: ImportAssetsFromS3RequestDetails)
importAssetsFromS3RequestDetails_assetSources :: Lens.Lens' ImportAssetsFromS3RequestDetails [AssetSourceEntry]
importAssetsFromS3RequestDetails_assetSources :: ([AssetSourceEntry] -> f [AssetSourceEntry])
-> ImportAssetsFromS3RequestDetails
-> f ImportAssetsFromS3RequestDetails
importAssetsFromS3RequestDetails_assetSources = (ImportAssetsFromS3RequestDetails -> [AssetSourceEntry])
-> (ImportAssetsFromS3RequestDetails
-> [AssetSourceEntry] -> ImportAssetsFromS3RequestDetails)
-> Lens
ImportAssetsFromS3RequestDetails
ImportAssetsFromS3RequestDetails
[AssetSourceEntry]
[AssetSourceEntry]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportAssetsFromS3RequestDetails' {[AssetSourceEntry]
assetSources :: [AssetSourceEntry]
$sel:assetSources:ImportAssetsFromS3RequestDetails' :: ImportAssetsFromS3RequestDetails -> [AssetSourceEntry]
assetSources} -> [AssetSourceEntry]
assetSources) (\s :: ImportAssetsFromS3RequestDetails
s@ImportAssetsFromS3RequestDetails' {} [AssetSourceEntry]
a -> ImportAssetsFromS3RequestDetails
s {$sel:assetSources:ImportAssetsFromS3RequestDetails' :: [AssetSourceEntry]
assetSources = [AssetSourceEntry]
a} :: ImportAssetsFromS3RequestDetails) (([AssetSourceEntry] -> f [AssetSourceEntry])
-> ImportAssetsFromS3RequestDetails
-> f ImportAssetsFromS3RequestDetails)
-> (([AssetSourceEntry] -> f [AssetSourceEntry])
-> [AssetSourceEntry] -> f [AssetSourceEntry])
-> ([AssetSourceEntry] -> f [AssetSourceEntry])
-> ImportAssetsFromS3RequestDetails
-> f ImportAssetsFromS3RequestDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AssetSourceEntry] -> f [AssetSourceEntry])
-> [AssetSourceEntry] -> f [AssetSourceEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
importAssetsFromS3RequestDetails_revisionId :: Lens.Lens' ImportAssetsFromS3RequestDetails Prelude.Text
importAssetsFromS3RequestDetails_revisionId :: (Text -> f Text)
-> ImportAssetsFromS3RequestDetails
-> f ImportAssetsFromS3RequestDetails
importAssetsFromS3RequestDetails_revisionId = (ImportAssetsFromS3RequestDetails -> Text)
-> (ImportAssetsFromS3RequestDetails
-> Text -> ImportAssetsFromS3RequestDetails)
-> Lens
ImportAssetsFromS3RequestDetails
ImportAssetsFromS3RequestDetails
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportAssetsFromS3RequestDetails' {Text
revisionId :: Text
$sel:revisionId:ImportAssetsFromS3RequestDetails' :: ImportAssetsFromS3RequestDetails -> Text
revisionId} -> Text
revisionId) (\s :: ImportAssetsFromS3RequestDetails
s@ImportAssetsFromS3RequestDetails' {} Text
a -> ImportAssetsFromS3RequestDetails
s {$sel:revisionId:ImportAssetsFromS3RequestDetails' :: Text
revisionId = Text
a} :: ImportAssetsFromS3RequestDetails)
instance
Prelude.Hashable
ImportAssetsFromS3RequestDetails
instance
Prelude.NFData
ImportAssetsFromS3RequestDetails
instance Core.ToJSON ImportAssetsFromS3RequestDetails where
toJSON :: ImportAssetsFromS3RequestDetails -> Value
toJSON ImportAssetsFromS3RequestDetails' {[AssetSourceEntry]
Text
revisionId :: Text
assetSources :: [AssetSourceEntry]
dataSetId :: Text
$sel:revisionId:ImportAssetsFromS3RequestDetails' :: ImportAssetsFromS3RequestDetails -> Text
$sel:assetSources:ImportAssetsFromS3RequestDetails' :: ImportAssetsFromS3RequestDetails -> [AssetSourceEntry]
$sel:dataSetId:ImportAssetsFromS3RequestDetails' :: ImportAssetsFromS3RequestDetails -> Text
..} =
[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
"DataSetId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
dataSetId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"AssetSources" Text -> [AssetSourceEntry] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [AssetSourceEntry]
assetSources),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"RevisionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
revisionId)
]
)