{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import Amazonka.SESV2.Types.SuppressionListImportAction
data SuppressionListDestination = SuppressionListDestination'
{
SuppressionListDestination -> SuppressionListImportAction
suppressionListImportAction :: SuppressionListImportAction
}
deriving (SuppressionListDestination -> SuppressionListDestination -> Bool
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]
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
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.
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'
{ $sel:suppressionListImportAction:SuppressionListDestination' :: SuppressionListImportAction
suppressionListImportAction =
SuppressionListImportAction
pSuppressionListImportAction_
}
suppressionListDestination_suppressionListImportAction :: Lens.Lens' SuppressionListDestination SuppressionListImportAction
suppressionListDestination_suppressionListImportAction :: Lens' SuppressionListDestination SuppressionListImportAction
suppressionListDestination_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 Data.FromJSON SuppressionListDestination where
parseJSON :: Value -> Parser SuppressionListDestination
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SuppressionListDestination"
( \Object
x ->
SuppressionListImportAction -> SuppressionListDestination
SuppressionListDestination'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"SuppressionListImportAction")
)
instance Prelude.Hashable SuppressionListDestination where
hashWithSalt :: Int -> SuppressionListDestination -> Int
hashWithSalt Int
_salt SuppressionListDestination' {SuppressionListImportAction
suppressionListImportAction :: SuppressionListImportAction
$sel:suppressionListImportAction:SuppressionListDestination' :: SuppressionListDestination -> SuppressionListImportAction
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` SuppressionListImportAction
suppressionListImportAction
instance Prelude.NFData SuppressionListDestination where
rnf :: SuppressionListDestination -> ()
rnf SuppressionListDestination' {SuppressionListImportAction
suppressionListImportAction :: SuppressionListImportAction
$sel:suppressionListImportAction:SuppressionListDestination' :: SuppressionListDestination -> SuppressionListImportAction
..} =
forall a. NFData a => a -> ()
Prelude.rnf SuppressionListImportAction
suppressionListImportAction
instance Data.ToJSON SuppressionListDestination where
toJSON :: SuppressionListDestination -> Value
toJSON SuppressionListDestination' {SuppressionListImportAction
suppressionListImportAction :: SuppressionListImportAction
$sel:suppressionListImportAction:SuppressionListDestination' :: SuppressionListDestination -> SuppressionListImportAction
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"SuppressionListImportAction"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= SuppressionListImportAction
suppressionListImportAction
)
]
)