{-# 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.ExportAssetsToS3RequestDetails where
import qualified Amazonka.Core as Core
import Amazonka.DataExchange.Types.AssetDestinationEntry
import Amazonka.DataExchange.Types.ExportServerSideEncryption
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ExportAssetsToS3RequestDetails = ExportAssetsToS3RequestDetails'
{
ExportAssetsToS3RequestDetails -> Maybe ExportServerSideEncryption
encryption :: Prelude.Maybe ExportServerSideEncryption,
ExportAssetsToS3RequestDetails -> [AssetDestinationEntry]
assetDestinations :: [AssetDestinationEntry],
ExportAssetsToS3RequestDetails -> Text
dataSetId :: Prelude.Text,
ExportAssetsToS3RequestDetails -> Text
revisionId :: Prelude.Text
}
deriving (ExportAssetsToS3RequestDetails
-> ExportAssetsToS3RequestDetails -> Bool
(ExportAssetsToS3RequestDetails
-> ExportAssetsToS3RequestDetails -> Bool)
-> (ExportAssetsToS3RequestDetails
-> ExportAssetsToS3RequestDetails -> Bool)
-> Eq ExportAssetsToS3RequestDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ExportAssetsToS3RequestDetails
-> ExportAssetsToS3RequestDetails -> Bool
$c/= :: ExportAssetsToS3RequestDetails
-> ExportAssetsToS3RequestDetails -> Bool
== :: ExportAssetsToS3RequestDetails
-> ExportAssetsToS3RequestDetails -> Bool
$c== :: ExportAssetsToS3RequestDetails
-> ExportAssetsToS3RequestDetails -> Bool
Prelude.Eq, ReadPrec [ExportAssetsToS3RequestDetails]
ReadPrec ExportAssetsToS3RequestDetails
Int -> ReadS ExportAssetsToS3RequestDetails
ReadS [ExportAssetsToS3RequestDetails]
(Int -> ReadS ExportAssetsToS3RequestDetails)
-> ReadS [ExportAssetsToS3RequestDetails]
-> ReadPrec ExportAssetsToS3RequestDetails
-> ReadPrec [ExportAssetsToS3RequestDetails]
-> Read ExportAssetsToS3RequestDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ExportAssetsToS3RequestDetails]
$creadListPrec :: ReadPrec [ExportAssetsToS3RequestDetails]
readPrec :: ReadPrec ExportAssetsToS3RequestDetails
$creadPrec :: ReadPrec ExportAssetsToS3RequestDetails
readList :: ReadS [ExportAssetsToS3RequestDetails]
$creadList :: ReadS [ExportAssetsToS3RequestDetails]
readsPrec :: Int -> ReadS ExportAssetsToS3RequestDetails
$creadsPrec :: Int -> ReadS ExportAssetsToS3RequestDetails
Prelude.Read, Int -> ExportAssetsToS3RequestDetails -> ShowS
[ExportAssetsToS3RequestDetails] -> ShowS
ExportAssetsToS3RequestDetails -> String
(Int -> ExportAssetsToS3RequestDetails -> ShowS)
-> (ExportAssetsToS3RequestDetails -> String)
-> ([ExportAssetsToS3RequestDetails] -> ShowS)
-> Show ExportAssetsToS3RequestDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ExportAssetsToS3RequestDetails] -> ShowS
$cshowList :: [ExportAssetsToS3RequestDetails] -> ShowS
show :: ExportAssetsToS3RequestDetails -> String
$cshow :: ExportAssetsToS3RequestDetails -> String
showsPrec :: Int -> ExportAssetsToS3RequestDetails -> ShowS
$cshowsPrec :: Int -> ExportAssetsToS3RequestDetails -> ShowS
Prelude.Show, (forall x.
ExportAssetsToS3RequestDetails
-> Rep ExportAssetsToS3RequestDetails x)
-> (forall x.
Rep ExportAssetsToS3RequestDetails x
-> ExportAssetsToS3RequestDetails)
-> Generic ExportAssetsToS3RequestDetails
forall x.
Rep ExportAssetsToS3RequestDetails x
-> ExportAssetsToS3RequestDetails
forall x.
ExportAssetsToS3RequestDetails
-> Rep ExportAssetsToS3RequestDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ExportAssetsToS3RequestDetails x
-> ExportAssetsToS3RequestDetails
$cfrom :: forall x.
ExportAssetsToS3RequestDetails
-> Rep ExportAssetsToS3RequestDetails x
Prelude.Generic)
newExportAssetsToS3RequestDetails ::
Prelude.Text ->
Prelude.Text ->
ExportAssetsToS3RequestDetails
newExportAssetsToS3RequestDetails :: Text -> Text -> ExportAssetsToS3RequestDetails
newExportAssetsToS3RequestDetails
Text
pDataSetId_
Text
pRevisionId_ =
ExportAssetsToS3RequestDetails' :: Maybe ExportServerSideEncryption
-> [AssetDestinationEntry]
-> Text
-> Text
-> ExportAssetsToS3RequestDetails
ExportAssetsToS3RequestDetails'
{ $sel:encryption:ExportAssetsToS3RequestDetails' :: Maybe ExportServerSideEncryption
encryption =
Maybe ExportServerSideEncryption
forall a. Maybe a
Prelude.Nothing,
$sel:assetDestinations:ExportAssetsToS3RequestDetails' :: [AssetDestinationEntry]
assetDestinations = [AssetDestinationEntry]
forall a. Monoid a => a
Prelude.mempty,
$sel:dataSetId:ExportAssetsToS3RequestDetails' :: Text
dataSetId = Text
pDataSetId_,
$sel:revisionId:ExportAssetsToS3RequestDetails' :: Text
revisionId = Text
pRevisionId_
}
exportAssetsToS3RequestDetails_encryption :: Lens.Lens' ExportAssetsToS3RequestDetails (Prelude.Maybe ExportServerSideEncryption)
exportAssetsToS3RequestDetails_encryption :: (Maybe ExportServerSideEncryption
-> f (Maybe ExportServerSideEncryption))
-> ExportAssetsToS3RequestDetails
-> f ExportAssetsToS3RequestDetails
exportAssetsToS3RequestDetails_encryption = (ExportAssetsToS3RequestDetails
-> Maybe ExportServerSideEncryption)
-> (ExportAssetsToS3RequestDetails
-> Maybe ExportServerSideEncryption
-> ExportAssetsToS3RequestDetails)
-> Lens
ExportAssetsToS3RequestDetails
ExportAssetsToS3RequestDetails
(Maybe ExportServerSideEncryption)
(Maybe ExportServerSideEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAssetsToS3RequestDetails' {Maybe ExportServerSideEncryption
encryption :: Maybe ExportServerSideEncryption
$sel:encryption:ExportAssetsToS3RequestDetails' :: ExportAssetsToS3RequestDetails -> Maybe ExportServerSideEncryption
encryption} -> Maybe ExportServerSideEncryption
encryption) (\s :: ExportAssetsToS3RequestDetails
s@ExportAssetsToS3RequestDetails' {} Maybe ExportServerSideEncryption
a -> ExportAssetsToS3RequestDetails
s {$sel:encryption:ExportAssetsToS3RequestDetails' :: Maybe ExportServerSideEncryption
encryption = Maybe ExportServerSideEncryption
a} :: ExportAssetsToS3RequestDetails)
exportAssetsToS3RequestDetails_assetDestinations :: Lens.Lens' ExportAssetsToS3RequestDetails [AssetDestinationEntry]
exportAssetsToS3RequestDetails_assetDestinations :: ([AssetDestinationEntry] -> f [AssetDestinationEntry])
-> ExportAssetsToS3RequestDetails
-> f ExportAssetsToS3RequestDetails
exportAssetsToS3RequestDetails_assetDestinations = (ExportAssetsToS3RequestDetails -> [AssetDestinationEntry])
-> (ExportAssetsToS3RequestDetails
-> [AssetDestinationEntry] -> ExportAssetsToS3RequestDetails)
-> Lens
ExportAssetsToS3RequestDetails
ExportAssetsToS3RequestDetails
[AssetDestinationEntry]
[AssetDestinationEntry]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAssetsToS3RequestDetails' {[AssetDestinationEntry]
assetDestinations :: [AssetDestinationEntry]
$sel:assetDestinations:ExportAssetsToS3RequestDetails' :: ExportAssetsToS3RequestDetails -> [AssetDestinationEntry]
assetDestinations} -> [AssetDestinationEntry]
assetDestinations) (\s :: ExportAssetsToS3RequestDetails
s@ExportAssetsToS3RequestDetails' {} [AssetDestinationEntry]
a -> ExportAssetsToS3RequestDetails
s {$sel:assetDestinations:ExportAssetsToS3RequestDetails' :: [AssetDestinationEntry]
assetDestinations = [AssetDestinationEntry]
a} :: ExportAssetsToS3RequestDetails) (([AssetDestinationEntry] -> f [AssetDestinationEntry])
-> ExportAssetsToS3RequestDetails
-> f ExportAssetsToS3RequestDetails)
-> (([AssetDestinationEntry] -> f [AssetDestinationEntry])
-> [AssetDestinationEntry] -> f [AssetDestinationEntry])
-> ([AssetDestinationEntry] -> f [AssetDestinationEntry])
-> ExportAssetsToS3RequestDetails
-> f ExportAssetsToS3RequestDetails
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([AssetDestinationEntry] -> f [AssetDestinationEntry])
-> [AssetDestinationEntry] -> f [AssetDestinationEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
exportAssetsToS3RequestDetails_dataSetId :: Lens.Lens' ExportAssetsToS3RequestDetails Prelude.Text
exportAssetsToS3RequestDetails_dataSetId :: (Text -> f Text)
-> ExportAssetsToS3RequestDetails
-> f ExportAssetsToS3RequestDetails
exportAssetsToS3RequestDetails_dataSetId = (ExportAssetsToS3RequestDetails -> Text)
-> (ExportAssetsToS3RequestDetails
-> Text -> ExportAssetsToS3RequestDetails)
-> Lens
ExportAssetsToS3RequestDetails
ExportAssetsToS3RequestDetails
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAssetsToS3RequestDetails' {Text
dataSetId :: Text
$sel:dataSetId:ExportAssetsToS3RequestDetails' :: ExportAssetsToS3RequestDetails -> Text
dataSetId} -> Text
dataSetId) (\s :: ExportAssetsToS3RequestDetails
s@ExportAssetsToS3RequestDetails' {} Text
a -> ExportAssetsToS3RequestDetails
s {$sel:dataSetId:ExportAssetsToS3RequestDetails' :: Text
dataSetId = Text
a} :: ExportAssetsToS3RequestDetails)
exportAssetsToS3RequestDetails_revisionId :: Lens.Lens' ExportAssetsToS3RequestDetails Prelude.Text
exportAssetsToS3RequestDetails_revisionId :: (Text -> f Text)
-> ExportAssetsToS3RequestDetails
-> f ExportAssetsToS3RequestDetails
exportAssetsToS3RequestDetails_revisionId = (ExportAssetsToS3RequestDetails -> Text)
-> (ExportAssetsToS3RequestDetails
-> Text -> ExportAssetsToS3RequestDetails)
-> Lens
ExportAssetsToS3RequestDetails
ExportAssetsToS3RequestDetails
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ExportAssetsToS3RequestDetails' {Text
revisionId :: Text
$sel:revisionId:ExportAssetsToS3RequestDetails' :: ExportAssetsToS3RequestDetails -> Text
revisionId} -> Text
revisionId) (\s :: ExportAssetsToS3RequestDetails
s@ExportAssetsToS3RequestDetails' {} Text
a -> ExportAssetsToS3RequestDetails
s {$sel:revisionId:ExportAssetsToS3RequestDetails' :: Text
revisionId = Text
a} :: ExportAssetsToS3RequestDetails)
instance
Prelude.Hashable
ExportAssetsToS3RequestDetails
instance
Prelude.NFData
ExportAssetsToS3RequestDetails
instance Core.ToJSON ExportAssetsToS3RequestDetails where
toJSON :: ExportAssetsToS3RequestDetails -> Value
toJSON ExportAssetsToS3RequestDetails' {[AssetDestinationEntry]
Maybe ExportServerSideEncryption
Text
revisionId :: Text
dataSetId :: Text
assetDestinations :: [AssetDestinationEntry]
encryption :: Maybe ExportServerSideEncryption
$sel:revisionId:ExportAssetsToS3RequestDetails' :: ExportAssetsToS3RequestDetails -> Text
$sel:dataSetId:ExportAssetsToS3RequestDetails' :: ExportAssetsToS3RequestDetails -> Text
$sel:assetDestinations:ExportAssetsToS3RequestDetails' :: ExportAssetsToS3RequestDetails -> [AssetDestinationEntry]
$sel:encryption:ExportAssetsToS3RequestDetails' :: ExportAssetsToS3RequestDetails -> Maybe ExportServerSideEncryption
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Encryption" Text -> ExportServerSideEncryption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ExportServerSideEncryption -> Pair)
-> Maybe ExportServerSideEncryption -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ExportServerSideEncryption
encryption,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"AssetDestinations" Text -> [AssetDestinationEntry] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [AssetDestinationEntry]
assetDestinations),
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
"RevisionId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
revisionId)
]
)