{-# 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.SESV2.Types.SuppressionListDestination where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SESV2.Types.SuppressionListImportAction
data SuppressionListDestination = SuppressionListDestination'
{
SuppressionListDestination -> SuppressionListImportAction
suppressionListImportAction :: SuppressionListImportAction
}
deriving (SuppressionListDestination -> SuppressionListDestination -> Bool
(SuppressionListDestination -> SuppressionListDestination -> Bool)
-> (SuppressionListDestination
-> SuppressionListDestination -> Bool)
-> Eq SuppressionListDestination
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SuppressionListDestination -> SuppressionListDestination -> Bool
$c/= :: SuppressionListDestination -> SuppressionListDestination -> Bool
== :: SuppressionListDestination -> SuppressionListDestination -> Bool
$c== :: SuppressionListDestination -> SuppressionListDestination -> Bool
Prelude.Eq, ReadPrec [SuppressionListDestination]
ReadPrec SuppressionListDestination
Int -> ReadS SuppressionListDestination
ReadS [SuppressionListDestination]
(Int -> ReadS SuppressionListDestination)
-> ReadS [SuppressionListDestination]
-> ReadPrec SuppressionListDestination
-> ReadPrec [SuppressionListDestination]
-> Read SuppressionListDestination
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SuppressionListDestination]
$creadListPrec :: ReadPrec [SuppressionListDestination]
readPrec :: ReadPrec SuppressionListDestination
$creadPrec :: ReadPrec SuppressionListDestination
readList :: ReadS [SuppressionListDestination]
$creadList :: ReadS [SuppressionListDestination]
readsPrec :: Int -> ReadS SuppressionListDestination
$creadsPrec :: Int -> ReadS SuppressionListDestination
Prelude.Read, Int -> SuppressionListDestination -> ShowS
[SuppressionListDestination] -> ShowS
SuppressionListDestination -> String
(Int -> SuppressionListDestination -> ShowS)
-> (SuppressionListDestination -> String)
-> ([SuppressionListDestination] -> ShowS)
-> Show SuppressionListDestination
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SuppressionListDestination] -> ShowS
$cshowList :: [SuppressionListDestination] -> ShowS
show :: SuppressionListDestination -> String
$cshow :: SuppressionListDestination -> String
showsPrec :: Int -> SuppressionListDestination -> ShowS
$cshowsPrec :: Int -> SuppressionListDestination -> ShowS
Prelude.Show, (forall x.
SuppressionListDestination -> Rep SuppressionListDestination x)
-> (forall x.
Rep SuppressionListDestination x -> SuppressionListDestination)
-> Generic SuppressionListDestination
forall x.
Rep SuppressionListDestination x -> SuppressionListDestination
forall x.
SuppressionListDestination -> Rep SuppressionListDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SuppressionListDestination x -> SuppressionListDestination
$cfrom :: forall x.
SuppressionListDestination -> Rep SuppressionListDestination x
Prelude.Generic)
newSuppressionListDestination ::
SuppressionListImportAction ->
SuppressionListDestination
newSuppressionListDestination :: SuppressionListImportAction -> SuppressionListDestination
newSuppressionListDestination
SuppressionListImportAction
pSuppressionListImportAction_ =
SuppressionListDestination' :: SuppressionListImportAction -> SuppressionListDestination
SuppressionListDestination'
{ $sel:suppressionListImportAction:SuppressionListDestination' :: SuppressionListImportAction
suppressionListImportAction =
SuppressionListImportAction
pSuppressionListImportAction_
}
suppressionListDestination_suppressionListImportAction :: Lens.Lens' SuppressionListDestination SuppressionListImportAction
suppressionListDestination_suppressionListImportAction :: (SuppressionListImportAction -> f SuppressionListImportAction)
-> SuppressionListDestination -> f SuppressionListDestination
suppressionListDestination_suppressionListImportAction = (SuppressionListDestination -> SuppressionListImportAction)
-> (SuppressionListDestination
-> SuppressionListImportAction -> SuppressionListDestination)
-> Lens
SuppressionListDestination
SuppressionListDestination
SuppressionListImportAction
SuppressionListImportAction
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SuppressionListDestination' {SuppressionListImportAction
suppressionListImportAction :: SuppressionListImportAction
$sel:suppressionListImportAction:SuppressionListDestination' :: SuppressionListDestination -> SuppressionListImportAction
suppressionListImportAction} -> SuppressionListImportAction
suppressionListImportAction) (\s :: SuppressionListDestination
s@SuppressionListDestination' {} SuppressionListImportAction
a -> SuppressionListDestination
s {$sel:suppressionListImportAction:SuppressionListDestination' :: SuppressionListImportAction
suppressionListImportAction = SuppressionListImportAction
a} :: SuppressionListDestination)
instance Core.FromJSON SuppressionListDestination where
parseJSON :: Value -> Parser SuppressionListDestination
parseJSON =
String
-> (Object -> Parser SuppressionListDestination)
-> Value
-> Parser SuppressionListDestination
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"SuppressionListDestination"
( \Object
x ->
SuppressionListImportAction -> SuppressionListDestination
SuppressionListDestination'
(SuppressionListImportAction -> SuppressionListDestination)
-> Parser SuppressionListImportAction
-> Parser SuppressionListDestination
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser SuppressionListImportAction
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"SuppressionListImportAction")
)
instance Prelude.Hashable SuppressionListDestination
instance Prelude.NFData SuppressionListDestination
instance Core.ToJSON SuppressionListDestination where
toJSON :: SuppressionListDestination -> Value
toJSON SuppressionListDestination' {SuppressionListImportAction
suppressionListImportAction :: SuppressionListImportAction
$sel:suppressionListImportAction:SuppressionListDestination' :: SuppressionListDestination -> SuppressionListImportAction
..} =
[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
"SuppressionListImportAction"
Text -> SuppressionListImportAction -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= SuppressionListImportAction
suppressionListImportAction
)
]
)