{-# 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.SES.Types.SNSDestination 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
data SNSDestination = SNSDestination'
{
SNSDestination -> Text
topicARN :: Prelude.Text
}
deriving (SNSDestination -> SNSDestination -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SNSDestination -> SNSDestination -> Bool
$c/= :: SNSDestination -> SNSDestination -> Bool
== :: SNSDestination -> SNSDestination -> Bool
$c== :: SNSDestination -> SNSDestination -> Bool
Prelude.Eq, ReadPrec [SNSDestination]
ReadPrec SNSDestination
Int -> ReadS SNSDestination
ReadS [SNSDestination]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SNSDestination]
$creadListPrec :: ReadPrec [SNSDestination]
readPrec :: ReadPrec SNSDestination
$creadPrec :: ReadPrec SNSDestination
readList :: ReadS [SNSDestination]
$creadList :: ReadS [SNSDestination]
readsPrec :: Int -> ReadS SNSDestination
$creadsPrec :: Int -> ReadS SNSDestination
Prelude.Read, Int -> SNSDestination -> ShowS
[SNSDestination] -> ShowS
SNSDestination -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SNSDestination] -> ShowS
$cshowList :: [SNSDestination] -> ShowS
show :: SNSDestination -> String
$cshow :: SNSDestination -> String
showsPrec :: Int -> SNSDestination -> ShowS
$cshowsPrec :: Int -> SNSDestination -> ShowS
Prelude.Show, forall x. Rep SNSDestination x -> SNSDestination
forall x. SNSDestination -> Rep SNSDestination x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SNSDestination x -> SNSDestination
$cfrom :: forall x. SNSDestination -> Rep SNSDestination x
Prelude.Generic)
newSNSDestination ::
Prelude.Text ->
SNSDestination
newSNSDestination :: Text -> SNSDestination
newSNSDestination Text
pTopicARN_ =
SNSDestination' {$sel:topicARN:SNSDestination' :: Text
topicARN = Text
pTopicARN_}
sNSDestination_topicARN :: Lens.Lens' SNSDestination Prelude.Text
sNSDestination_topicARN :: Lens' SNSDestination Text
sNSDestination_topicARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SNSDestination' {Text
topicARN :: Text
$sel:topicARN:SNSDestination' :: SNSDestination -> Text
topicARN} -> Text
topicARN) (\s :: SNSDestination
s@SNSDestination' {} Text
a -> SNSDestination
s {$sel:topicARN:SNSDestination' :: Text
topicARN = Text
a} :: SNSDestination)
instance Data.FromXML SNSDestination where
parseXML :: [Node] -> Either String SNSDestination
parseXML [Node]
x =
Text -> SNSDestination
SNSDestination' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"TopicARN")
instance Prelude.Hashable SNSDestination where
hashWithSalt :: Int -> SNSDestination -> Int
hashWithSalt Int
_salt SNSDestination' {Text
topicARN :: Text
$sel:topicARN:SNSDestination' :: SNSDestination -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
topicARN
instance Prelude.NFData SNSDestination where
rnf :: SNSDestination -> ()
rnf SNSDestination' {Text
topicARN :: Text
$sel:topicARN:SNSDestination' :: SNSDestination -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
topicARN
instance Data.ToQuery SNSDestination where
toQuery :: SNSDestination -> QueryString
toQuery SNSDestination' {Text
topicARN :: Text
$sel:topicARN:SNSDestination' :: SNSDestination -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"TopicARN" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
topicARN]