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