{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.SES.GetIdentityNotificationAttributes
(
GetIdentityNotificationAttributes (..),
newGetIdentityNotificationAttributes,
getIdentityNotificationAttributes_identities,
GetIdentityNotificationAttributesResponse (..),
newGetIdentityNotificationAttributesResponse,
getIdentityNotificationAttributesResponse_httpStatus,
getIdentityNotificationAttributesResponse_notificationAttributes,
)
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 qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SES.Types
data GetIdentityNotificationAttributes = GetIdentityNotificationAttributes'
{
GetIdentityNotificationAttributes -> [Text]
identities :: [Prelude.Text]
}
deriving (GetIdentityNotificationAttributes
-> GetIdentityNotificationAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetIdentityNotificationAttributes
-> GetIdentityNotificationAttributes -> Bool
$c/= :: GetIdentityNotificationAttributes
-> GetIdentityNotificationAttributes -> Bool
== :: GetIdentityNotificationAttributes
-> GetIdentityNotificationAttributes -> Bool
$c== :: GetIdentityNotificationAttributes
-> GetIdentityNotificationAttributes -> Bool
Prelude.Eq, ReadPrec [GetIdentityNotificationAttributes]
ReadPrec GetIdentityNotificationAttributes
Int -> ReadS GetIdentityNotificationAttributes
ReadS [GetIdentityNotificationAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetIdentityNotificationAttributes]
$creadListPrec :: ReadPrec [GetIdentityNotificationAttributes]
readPrec :: ReadPrec GetIdentityNotificationAttributes
$creadPrec :: ReadPrec GetIdentityNotificationAttributes
readList :: ReadS [GetIdentityNotificationAttributes]
$creadList :: ReadS [GetIdentityNotificationAttributes]
readsPrec :: Int -> ReadS GetIdentityNotificationAttributes
$creadsPrec :: Int -> ReadS GetIdentityNotificationAttributes
Prelude.Read, Int -> GetIdentityNotificationAttributes -> ShowS
[GetIdentityNotificationAttributes] -> ShowS
GetIdentityNotificationAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetIdentityNotificationAttributes] -> ShowS
$cshowList :: [GetIdentityNotificationAttributes] -> ShowS
show :: GetIdentityNotificationAttributes -> String
$cshow :: GetIdentityNotificationAttributes -> String
showsPrec :: Int -> GetIdentityNotificationAttributes -> ShowS
$cshowsPrec :: Int -> GetIdentityNotificationAttributes -> ShowS
Prelude.Show, forall x.
Rep GetIdentityNotificationAttributes x
-> GetIdentityNotificationAttributes
forall x.
GetIdentityNotificationAttributes
-> Rep GetIdentityNotificationAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetIdentityNotificationAttributes x
-> GetIdentityNotificationAttributes
$cfrom :: forall x.
GetIdentityNotificationAttributes
-> Rep GetIdentityNotificationAttributes x
Prelude.Generic)
newGetIdentityNotificationAttributes ::
GetIdentityNotificationAttributes
newGetIdentityNotificationAttributes :: GetIdentityNotificationAttributes
newGetIdentityNotificationAttributes =
GetIdentityNotificationAttributes'
{ $sel:identities:GetIdentityNotificationAttributes' :: [Text]
identities =
forall a. Monoid a => a
Prelude.mempty
}
getIdentityNotificationAttributes_identities :: Lens.Lens' GetIdentityNotificationAttributes [Prelude.Text]
getIdentityNotificationAttributes_identities :: Lens' GetIdentityNotificationAttributes [Text]
getIdentityNotificationAttributes_identities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIdentityNotificationAttributes' {[Text]
identities :: [Text]
$sel:identities:GetIdentityNotificationAttributes' :: GetIdentityNotificationAttributes -> [Text]
identities} -> [Text]
identities) (\s :: GetIdentityNotificationAttributes
s@GetIdentityNotificationAttributes' {} [Text]
a -> GetIdentityNotificationAttributes
s {$sel:identities:GetIdentityNotificationAttributes' :: [Text]
identities = [Text]
a} :: GetIdentityNotificationAttributes) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.AWSRequest
GetIdentityNotificationAttributes
where
type
AWSResponse GetIdentityNotificationAttributes =
GetIdentityNotificationAttributesResponse
request :: (Service -> Service)
-> GetIdentityNotificationAttributes
-> Request GetIdentityNotificationAttributes
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetIdentityNotificationAttributes
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetIdentityNotificationAttributes)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"GetIdentityNotificationAttributesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int
-> HashMap Text IdentityNotificationAttributes
-> GetIdentityNotificationAttributesResponse
GetIdentityNotificationAttributesResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"NotificationAttributes"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall k v.
(Eq k, Hashable k, FromText k, FromXML v) =>
Text -> Text -> Text -> [Node] -> Either String (HashMap k v)
Data.parseXMLMap Text
"entry" Text
"key" Text
"value"
)
)
instance
Prelude.Hashable
GetIdentityNotificationAttributes
where
hashWithSalt :: Int -> GetIdentityNotificationAttributes -> Int
hashWithSalt
Int
_salt
GetIdentityNotificationAttributes' {[Text]
identities :: [Text]
$sel:identities:GetIdentityNotificationAttributes' :: GetIdentityNotificationAttributes -> [Text]
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
identities
instance
Prelude.NFData
GetIdentityNotificationAttributes
where
rnf :: GetIdentityNotificationAttributes -> ()
rnf GetIdentityNotificationAttributes' {[Text]
identities :: [Text]
$sel:identities:GetIdentityNotificationAttributes' :: GetIdentityNotificationAttributes -> [Text]
..} =
forall a. NFData a => a -> ()
Prelude.rnf [Text]
identities
instance
Data.ToHeaders
GetIdentityNotificationAttributes
where
toHeaders :: GetIdentityNotificationAttributes -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance
Data.ToPath
GetIdentityNotificationAttributes
where
toPath :: GetIdentityNotificationAttributes -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
GetIdentityNotificationAttributes
where
toQuery :: GetIdentityNotificationAttributes -> QueryString
toQuery GetIdentityNotificationAttributes' {[Text]
identities :: [Text]
$sel:identities:GetIdentityNotificationAttributes' :: GetIdentityNotificationAttributes -> [Text]
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"GetIdentityNotificationAttributes" ::
Prelude.ByteString
),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"Identities"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" [Text]
identities
]
data GetIdentityNotificationAttributesResponse = GetIdentityNotificationAttributesResponse'
{
GetIdentityNotificationAttributesResponse -> Int
httpStatus :: Prelude.Int,
GetIdentityNotificationAttributesResponse
-> HashMap Text IdentityNotificationAttributes
notificationAttributes :: Prelude.HashMap Prelude.Text IdentityNotificationAttributes
}
deriving (GetIdentityNotificationAttributesResponse
-> GetIdentityNotificationAttributesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetIdentityNotificationAttributesResponse
-> GetIdentityNotificationAttributesResponse -> Bool
$c/= :: GetIdentityNotificationAttributesResponse
-> GetIdentityNotificationAttributesResponse -> Bool
== :: GetIdentityNotificationAttributesResponse
-> GetIdentityNotificationAttributesResponse -> Bool
$c== :: GetIdentityNotificationAttributesResponse
-> GetIdentityNotificationAttributesResponse -> Bool
Prelude.Eq, ReadPrec [GetIdentityNotificationAttributesResponse]
ReadPrec GetIdentityNotificationAttributesResponse
Int -> ReadS GetIdentityNotificationAttributesResponse
ReadS [GetIdentityNotificationAttributesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetIdentityNotificationAttributesResponse]
$creadListPrec :: ReadPrec [GetIdentityNotificationAttributesResponse]
readPrec :: ReadPrec GetIdentityNotificationAttributesResponse
$creadPrec :: ReadPrec GetIdentityNotificationAttributesResponse
readList :: ReadS [GetIdentityNotificationAttributesResponse]
$creadList :: ReadS [GetIdentityNotificationAttributesResponse]
readsPrec :: Int -> ReadS GetIdentityNotificationAttributesResponse
$creadsPrec :: Int -> ReadS GetIdentityNotificationAttributesResponse
Prelude.Read, Int -> GetIdentityNotificationAttributesResponse -> ShowS
[GetIdentityNotificationAttributesResponse] -> ShowS
GetIdentityNotificationAttributesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetIdentityNotificationAttributesResponse] -> ShowS
$cshowList :: [GetIdentityNotificationAttributesResponse] -> ShowS
show :: GetIdentityNotificationAttributesResponse -> String
$cshow :: GetIdentityNotificationAttributesResponse -> String
showsPrec :: Int -> GetIdentityNotificationAttributesResponse -> ShowS
$cshowsPrec :: Int -> GetIdentityNotificationAttributesResponse -> ShowS
Prelude.Show, forall x.
Rep GetIdentityNotificationAttributesResponse x
-> GetIdentityNotificationAttributesResponse
forall x.
GetIdentityNotificationAttributesResponse
-> Rep GetIdentityNotificationAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetIdentityNotificationAttributesResponse x
-> GetIdentityNotificationAttributesResponse
$cfrom :: forall x.
GetIdentityNotificationAttributesResponse
-> Rep GetIdentityNotificationAttributesResponse x
Prelude.Generic)
newGetIdentityNotificationAttributesResponse ::
Prelude.Int ->
GetIdentityNotificationAttributesResponse
newGetIdentityNotificationAttributesResponse :: Int -> GetIdentityNotificationAttributesResponse
newGetIdentityNotificationAttributesResponse
Int
pHttpStatus_ =
GetIdentityNotificationAttributesResponse'
{ $sel:httpStatus:GetIdentityNotificationAttributesResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:notificationAttributes:GetIdentityNotificationAttributesResponse' :: HashMap Text IdentityNotificationAttributes
notificationAttributes =
forall a. Monoid a => a
Prelude.mempty
}
getIdentityNotificationAttributesResponse_httpStatus :: Lens.Lens' GetIdentityNotificationAttributesResponse Prelude.Int
getIdentityNotificationAttributesResponse_httpStatus :: Lens' GetIdentityNotificationAttributesResponse Int
getIdentityNotificationAttributesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIdentityNotificationAttributesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetIdentityNotificationAttributesResponse' :: GetIdentityNotificationAttributesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetIdentityNotificationAttributesResponse
s@GetIdentityNotificationAttributesResponse' {} Int
a -> GetIdentityNotificationAttributesResponse
s {$sel:httpStatus:GetIdentityNotificationAttributesResponse' :: Int
httpStatus = Int
a} :: GetIdentityNotificationAttributesResponse)
getIdentityNotificationAttributesResponse_notificationAttributes :: Lens.Lens' GetIdentityNotificationAttributesResponse (Prelude.HashMap Prelude.Text IdentityNotificationAttributes)
getIdentityNotificationAttributesResponse_notificationAttributes :: Lens'
GetIdentityNotificationAttributesResponse
(HashMap Text IdentityNotificationAttributes)
getIdentityNotificationAttributesResponse_notificationAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIdentityNotificationAttributesResponse' {HashMap Text IdentityNotificationAttributes
notificationAttributes :: HashMap Text IdentityNotificationAttributes
$sel:notificationAttributes:GetIdentityNotificationAttributesResponse' :: GetIdentityNotificationAttributesResponse
-> HashMap Text IdentityNotificationAttributes
notificationAttributes} -> HashMap Text IdentityNotificationAttributes
notificationAttributes) (\s :: GetIdentityNotificationAttributesResponse
s@GetIdentityNotificationAttributesResponse' {} HashMap Text IdentityNotificationAttributes
a -> GetIdentityNotificationAttributesResponse
s {$sel:notificationAttributes:GetIdentityNotificationAttributesResponse' :: HashMap Text IdentityNotificationAttributes
notificationAttributes = HashMap Text IdentityNotificationAttributes
a} :: GetIdentityNotificationAttributesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.NFData
GetIdentityNotificationAttributesResponse
where
rnf :: GetIdentityNotificationAttributesResponse -> ()
rnf GetIdentityNotificationAttributesResponse' {Int
HashMap Text IdentityNotificationAttributes
notificationAttributes :: HashMap Text IdentityNotificationAttributes
httpStatus :: Int
$sel:notificationAttributes:GetIdentityNotificationAttributesResponse' :: GetIdentityNotificationAttributesResponse
-> HashMap Text IdentityNotificationAttributes
$sel:httpStatus:GetIdentityNotificationAttributesResponse' :: GetIdentityNotificationAttributesResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HashMap Text IdentityNotificationAttributes
notificationAttributes