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