{-# 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.AutoExportRevisionToS3RequestDetails where
import qualified Amazonka.Core as Core
import Amazonka.DataExchange.Types.AutoExportRevisionDestinationEntry
import Amazonka.DataExchange.Types.ExportServerSideEncryption
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AutoExportRevisionToS3RequestDetails = AutoExportRevisionToS3RequestDetails'
{
AutoExportRevisionToS3RequestDetails
-> Maybe ExportServerSideEncryption
encryption :: Prelude.Maybe ExportServerSideEncryption,
AutoExportRevisionToS3RequestDetails
-> AutoExportRevisionDestinationEntry
revisionDestination :: AutoExportRevisionDestinationEntry
}
deriving (AutoExportRevisionToS3RequestDetails
-> AutoExportRevisionToS3RequestDetails -> Bool
(AutoExportRevisionToS3RequestDetails
-> AutoExportRevisionToS3RequestDetails -> Bool)
-> (AutoExportRevisionToS3RequestDetails
-> AutoExportRevisionToS3RequestDetails -> Bool)
-> Eq AutoExportRevisionToS3RequestDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoExportRevisionToS3RequestDetails
-> AutoExportRevisionToS3RequestDetails -> Bool
$c/= :: AutoExportRevisionToS3RequestDetails
-> AutoExportRevisionToS3RequestDetails -> Bool
== :: AutoExportRevisionToS3RequestDetails
-> AutoExportRevisionToS3RequestDetails -> Bool
$c== :: AutoExportRevisionToS3RequestDetails
-> AutoExportRevisionToS3RequestDetails -> Bool
Prelude.Eq, ReadPrec [AutoExportRevisionToS3RequestDetails]
ReadPrec AutoExportRevisionToS3RequestDetails
Int -> ReadS AutoExportRevisionToS3RequestDetails
ReadS [AutoExportRevisionToS3RequestDetails]
(Int -> ReadS AutoExportRevisionToS3RequestDetails)
-> ReadS [AutoExportRevisionToS3RequestDetails]
-> ReadPrec AutoExportRevisionToS3RequestDetails
-> ReadPrec [AutoExportRevisionToS3RequestDetails]
-> Read AutoExportRevisionToS3RequestDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutoExportRevisionToS3RequestDetails]
$creadListPrec :: ReadPrec [AutoExportRevisionToS3RequestDetails]
readPrec :: ReadPrec AutoExportRevisionToS3RequestDetails
$creadPrec :: ReadPrec AutoExportRevisionToS3RequestDetails
readList :: ReadS [AutoExportRevisionToS3RequestDetails]
$creadList :: ReadS [AutoExportRevisionToS3RequestDetails]
readsPrec :: Int -> ReadS AutoExportRevisionToS3RequestDetails
$creadsPrec :: Int -> ReadS AutoExportRevisionToS3RequestDetails
Prelude.Read, Int -> AutoExportRevisionToS3RequestDetails -> ShowS
[AutoExportRevisionToS3RequestDetails] -> ShowS
AutoExportRevisionToS3RequestDetails -> String
(Int -> AutoExportRevisionToS3RequestDetails -> ShowS)
-> (AutoExportRevisionToS3RequestDetails -> String)
-> ([AutoExportRevisionToS3RequestDetails] -> ShowS)
-> Show AutoExportRevisionToS3RequestDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoExportRevisionToS3RequestDetails] -> ShowS
$cshowList :: [AutoExportRevisionToS3RequestDetails] -> ShowS
show :: AutoExportRevisionToS3RequestDetails -> String
$cshow :: AutoExportRevisionToS3RequestDetails -> String
showsPrec :: Int -> AutoExportRevisionToS3RequestDetails -> ShowS
$cshowsPrec :: Int -> AutoExportRevisionToS3RequestDetails -> ShowS
Prelude.Show, (forall x.
AutoExportRevisionToS3RequestDetails
-> Rep AutoExportRevisionToS3RequestDetails x)
-> (forall x.
Rep AutoExportRevisionToS3RequestDetails x
-> AutoExportRevisionToS3RequestDetails)
-> Generic AutoExportRevisionToS3RequestDetails
forall x.
Rep AutoExportRevisionToS3RequestDetails x
-> AutoExportRevisionToS3RequestDetails
forall x.
AutoExportRevisionToS3RequestDetails
-> Rep AutoExportRevisionToS3RequestDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AutoExportRevisionToS3RequestDetails x
-> AutoExportRevisionToS3RequestDetails
$cfrom :: forall x.
AutoExportRevisionToS3RequestDetails
-> Rep AutoExportRevisionToS3RequestDetails x
Prelude.Generic)
newAutoExportRevisionToS3RequestDetails ::
AutoExportRevisionDestinationEntry ->
AutoExportRevisionToS3RequestDetails
newAutoExportRevisionToS3RequestDetails :: AutoExportRevisionDestinationEntry
-> AutoExportRevisionToS3RequestDetails
newAutoExportRevisionToS3RequestDetails
AutoExportRevisionDestinationEntry
pRevisionDestination_ =
AutoExportRevisionToS3RequestDetails' :: Maybe ExportServerSideEncryption
-> AutoExportRevisionDestinationEntry
-> AutoExportRevisionToS3RequestDetails
AutoExportRevisionToS3RequestDetails'
{ $sel:encryption:AutoExportRevisionToS3RequestDetails' :: Maybe ExportServerSideEncryption
encryption =
Maybe ExportServerSideEncryption
forall a. Maybe a
Prelude.Nothing,
$sel:revisionDestination:AutoExportRevisionToS3RequestDetails' :: AutoExportRevisionDestinationEntry
revisionDestination =
AutoExportRevisionDestinationEntry
pRevisionDestination_
}
autoExportRevisionToS3RequestDetails_encryption :: Lens.Lens' AutoExportRevisionToS3RequestDetails (Prelude.Maybe ExportServerSideEncryption)
autoExportRevisionToS3RequestDetails_encryption :: (Maybe ExportServerSideEncryption
-> f (Maybe ExportServerSideEncryption))
-> AutoExportRevisionToS3RequestDetails
-> f AutoExportRevisionToS3RequestDetails
autoExportRevisionToS3RequestDetails_encryption = (AutoExportRevisionToS3RequestDetails
-> Maybe ExportServerSideEncryption)
-> (AutoExportRevisionToS3RequestDetails
-> Maybe ExportServerSideEncryption
-> AutoExportRevisionToS3RequestDetails)
-> Lens
AutoExportRevisionToS3RequestDetails
AutoExportRevisionToS3RequestDetails
(Maybe ExportServerSideEncryption)
(Maybe ExportServerSideEncryption)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoExportRevisionToS3RequestDetails' {Maybe ExportServerSideEncryption
encryption :: Maybe ExportServerSideEncryption
$sel:encryption:AutoExportRevisionToS3RequestDetails' :: AutoExportRevisionToS3RequestDetails
-> Maybe ExportServerSideEncryption
encryption} -> Maybe ExportServerSideEncryption
encryption) (\s :: AutoExportRevisionToS3RequestDetails
s@AutoExportRevisionToS3RequestDetails' {} Maybe ExportServerSideEncryption
a -> AutoExportRevisionToS3RequestDetails
s {$sel:encryption:AutoExportRevisionToS3RequestDetails' :: Maybe ExportServerSideEncryption
encryption = Maybe ExportServerSideEncryption
a} :: AutoExportRevisionToS3RequestDetails)
autoExportRevisionToS3RequestDetails_revisionDestination :: Lens.Lens' AutoExportRevisionToS3RequestDetails AutoExportRevisionDestinationEntry
autoExportRevisionToS3RequestDetails_revisionDestination :: (AutoExportRevisionDestinationEntry
-> f AutoExportRevisionDestinationEntry)
-> AutoExportRevisionToS3RequestDetails
-> f AutoExportRevisionToS3RequestDetails
autoExportRevisionToS3RequestDetails_revisionDestination = (AutoExportRevisionToS3RequestDetails
-> AutoExportRevisionDestinationEntry)
-> (AutoExportRevisionToS3RequestDetails
-> AutoExportRevisionDestinationEntry
-> AutoExportRevisionToS3RequestDetails)
-> Lens
AutoExportRevisionToS3RequestDetails
AutoExportRevisionToS3RequestDetails
AutoExportRevisionDestinationEntry
AutoExportRevisionDestinationEntry
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoExportRevisionToS3RequestDetails' {AutoExportRevisionDestinationEntry
revisionDestination :: AutoExportRevisionDestinationEntry
$sel:revisionDestination:AutoExportRevisionToS3RequestDetails' :: AutoExportRevisionToS3RequestDetails
-> AutoExportRevisionDestinationEntry
revisionDestination} -> AutoExportRevisionDestinationEntry
revisionDestination) (\s :: AutoExportRevisionToS3RequestDetails
s@AutoExportRevisionToS3RequestDetails' {} AutoExportRevisionDestinationEntry
a -> AutoExportRevisionToS3RequestDetails
s {$sel:revisionDestination:AutoExportRevisionToS3RequestDetails' :: AutoExportRevisionDestinationEntry
revisionDestination = AutoExportRevisionDestinationEntry
a} :: AutoExportRevisionToS3RequestDetails)
instance
Core.FromJSON
AutoExportRevisionToS3RequestDetails
where
parseJSON :: Value -> Parser AutoExportRevisionToS3RequestDetails
parseJSON =
String
-> (Object -> Parser AutoExportRevisionToS3RequestDetails)
-> Value
-> Parser AutoExportRevisionToS3RequestDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AutoExportRevisionToS3RequestDetails"
( \Object
x ->
Maybe ExportServerSideEncryption
-> AutoExportRevisionDestinationEntry
-> AutoExportRevisionToS3RequestDetails
AutoExportRevisionToS3RequestDetails'
(Maybe ExportServerSideEncryption
-> AutoExportRevisionDestinationEntry
-> AutoExportRevisionToS3RequestDetails)
-> Parser (Maybe ExportServerSideEncryption)
-> Parser
(AutoExportRevisionDestinationEntry
-> AutoExportRevisionToS3RequestDetails)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ExportServerSideEncryption)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Encryption")
Parser
(AutoExportRevisionDestinationEntry
-> AutoExportRevisionToS3RequestDetails)
-> Parser AutoExportRevisionDestinationEntry
-> Parser AutoExportRevisionToS3RequestDetails
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AutoExportRevisionDestinationEntry
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RevisionDestination")
)
instance
Prelude.Hashable
AutoExportRevisionToS3RequestDetails
instance
Prelude.NFData
AutoExportRevisionToS3RequestDetails
instance
Core.ToJSON
AutoExportRevisionToS3RequestDetails
where
toJSON :: AutoExportRevisionToS3RequestDetails -> Value
toJSON AutoExportRevisionToS3RequestDetails' {Maybe ExportServerSideEncryption
AutoExportRevisionDestinationEntry
revisionDestination :: AutoExportRevisionDestinationEntry
encryption :: Maybe ExportServerSideEncryption
$sel:revisionDestination:AutoExportRevisionToS3RequestDetails' :: AutoExportRevisionToS3RequestDetails
-> AutoExportRevisionDestinationEntry
$sel:encryption:AutoExportRevisionToS3RequestDetails' :: AutoExportRevisionToS3RequestDetails
-> 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
"RevisionDestination" Text -> AutoExportRevisionDestinationEntry -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AutoExportRevisionDestinationEntry
revisionDestination)
]
)