{-# 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.GetIdentityDkimAttributes
(
GetIdentityDkimAttributes (..),
newGetIdentityDkimAttributes,
getIdentityDkimAttributes_identities,
GetIdentityDkimAttributesResponse (..),
newGetIdentityDkimAttributesResponse,
getIdentityDkimAttributesResponse_httpStatus,
getIdentityDkimAttributesResponse_dkimAttributes,
)
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 GetIdentityDkimAttributes = GetIdentityDkimAttributes'
{
GetIdentityDkimAttributes -> [Text]
identities :: [Prelude.Text]
}
deriving (GetIdentityDkimAttributes -> GetIdentityDkimAttributes -> Bool
(GetIdentityDkimAttributes -> GetIdentityDkimAttributes -> Bool)
-> (GetIdentityDkimAttributes -> GetIdentityDkimAttributes -> Bool)
-> Eq GetIdentityDkimAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetIdentityDkimAttributes -> GetIdentityDkimAttributes -> Bool
== :: GetIdentityDkimAttributes -> GetIdentityDkimAttributes -> Bool
$c/= :: GetIdentityDkimAttributes -> GetIdentityDkimAttributes -> Bool
/= :: GetIdentityDkimAttributes -> GetIdentityDkimAttributes -> Bool
Prelude.Eq, ReadPrec [GetIdentityDkimAttributes]
ReadPrec GetIdentityDkimAttributes
Int -> ReadS GetIdentityDkimAttributes
ReadS [GetIdentityDkimAttributes]
(Int -> ReadS GetIdentityDkimAttributes)
-> ReadS [GetIdentityDkimAttributes]
-> ReadPrec GetIdentityDkimAttributes
-> ReadPrec [GetIdentityDkimAttributes]
-> Read GetIdentityDkimAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS GetIdentityDkimAttributes
readsPrec :: Int -> ReadS GetIdentityDkimAttributes
$creadList :: ReadS [GetIdentityDkimAttributes]
readList :: ReadS [GetIdentityDkimAttributes]
$creadPrec :: ReadPrec GetIdentityDkimAttributes
readPrec :: ReadPrec GetIdentityDkimAttributes
$creadListPrec :: ReadPrec [GetIdentityDkimAttributes]
readListPrec :: ReadPrec [GetIdentityDkimAttributes]
Prelude.Read, Int -> GetIdentityDkimAttributes -> ShowS
[GetIdentityDkimAttributes] -> ShowS
GetIdentityDkimAttributes -> String
(Int -> GetIdentityDkimAttributes -> ShowS)
-> (GetIdentityDkimAttributes -> String)
-> ([GetIdentityDkimAttributes] -> ShowS)
-> Show GetIdentityDkimAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetIdentityDkimAttributes -> ShowS
showsPrec :: Int -> GetIdentityDkimAttributes -> ShowS
$cshow :: GetIdentityDkimAttributes -> String
show :: GetIdentityDkimAttributes -> String
$cshowList :: [GetIdentityDkimAttributes] -> ShowS
showList :: [GetIdentityDkimAttributes] -> ShowS
Prelude.Show, (forall x.
GetIdentityDkimAttributes -> Rep GetIdentityDkimAttributes x)
-> (forall x.
Rep GetIdentityDkimAttributes x -> GetIdentityDkimAttributes)
-> Generic GetIdentityDkimAttributes
forall x.
Rep GetIdentityDkimAttributes x -> GetIdentityDkimAttributes
forall x.
GetIdentityDkimAttributes -> Rep GetIdentityDkimAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
GetIdentityDkimAttributes -> Rep GetIdentityDkimAttributes x
from :: forall x.
GetIdentityDkimAttributes -> Rep GetIdentityDkimAttributes x
$cto :: forall x.
Rep GetIdentityDkimAttributes x -> GetIdentityDkimAttributes
to :: forall x.
Rep GetIdentityDkimAttributes x -> GetIdentityDkimAttributes
Prelude.Generic)
newGetIdentityDkimAttributes ::
GetIdentityDkimAttributes
newGetIdentityDkimAttributes :: GetIdentityDkimAttributes
newGetIdentityDkimAttributes =
GetIdentityDkimAttributes'
{ $sel:identities:GetIdentityDkimAttributes' :: [Text]
identities =
[Text]
forall a. Monoid a => a
Prelude.mempty
}
getIdentityDkimAttributes_identities :: Lens.Lens' GetIdentityDkimAttributes [Prelude.Text]
getIdentityDkimAttributes_identities :: Lens' GetIdentityDkimAttributes [Text]
getIdentityDkimAttributes_identities = (GetIdentityDkimAttributes -> [Text])
-> (GetIdentityDkimAttributes
-> [Text] -> GetIdentityDkimAttributes)
-> Lens' GetIdentityDkimAttributes [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIdentityDkimAttributes' {[Text]
$sel:identities:GetIdentityDkimAttributes' :: GetIdentityDkimAttributes -> [Text]
identities :: [Text]
identities} -> [Text]
identities) (\s :: GetIdentityDkimAttributes
s@GetIdentityDkimAttributes' {} [Text]
a -> GetIdentityDkimAttributes
s {identities = a} :: GetIdentityDkimAttributes) (([Text] -> f [Text])
-> GetIdentityDkimAttributes -> f GetIdentityDkimAttributes)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> GetIdentityDkimAttributes
-> f GetIdentityDkimAttributes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Iso [Text] [Text] [Text] [Text]
Lens.coerced
instance Core.AWSRequest GetIdentityDkimAttributes where
type
AWSResponse GetIdentityDkimAttributes =
GetIdentityDkimAttributesResponse
request :: (Service -> Service)
-> GetIdentityDkimAttributes -> Request GetIdentityDkimAttributes
request Service -> Service
overrides =
Service
-> GetIdentityDkimAttributes -> Request GetIdentityDkimAttributes
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 GetIdentityDkimAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetIdentityDkimAttributes)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse GetIdentityDkimAttributes))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetIdentityDkimAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetIdentityDkimAttributes)))
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
"GetIdentityDkimAttributesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int
-> HashMap Text IdentityDkimAttributes
-> GetIdentityDkimAttributesResponse
GetIdentityDkimAttributesResponse'
(Int
-> HashMap Text IdentityDkimAttributes
-> GetIdentityDkimAttributesResponse)
-> Either String Int
-> Either
String
(HashMap Text IdentityDkimAttributes
-> GetIdentityDkimAttributesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall a. a -> Either String a
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
Either
String
(HashMap Text IdentityDkimAttributes
-> GetIdentityDkimAttributesResponse)
-> Either String (HashMap Text IdentityDkimAttributes)
-> Either String GetIdentityDkimAttributesResponse
forall a b.
Either String (a -> b) -> Either String a -> Either String b
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
[Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"DkimAttributes"
Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
Either String [Node]
-> ([Node] -> Either String (HashMap Text IdentityDkimAttributes))
-> Either String (HashMap Text IdentityDkimAttributes)
forall a b.
Either String a -> (a -> Either String b) -> Either String b
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text
-> Text
-> Text
-> [Node]
-> Either String (HashMap Text IdentityDkimAttributes)
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 GetIdentityDkimAttributes where
hashWithSalt :: Int -> GetIdentityDkimAttributes -> Int
hashWithSalt Int
_salt GetIdentityDkimAttributes' {[Text]
$sel:identities:GetIdentityDkimAttributes' :: GetIdentityDkimAttributes -> [Text]
identities :: [Text]
..} =
Int
_salt Int -> [Text] -> Int
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
identities
instance Prelude.NFData GetIdentityDkimAttributes where
rnf :: GetIdentityDkimAttributes -> ()
rnf GetIdentityDkimAttributes' {[Text]
$sel:identities:GetIdentityDkimAttributes' :: GetIdentityDkimAttributes -> [Text]
identities :: [Text]
..} =
[Text] -> ()
forall a. NFData a => a -> ()
Prelude.rnf [Text]
identities
instance Data.ToHeaders GetIdentityDkimAttributes where
toHeaders :: GetIdentityDkimAttributes -> ResponseHeaders
toHeaders = ResponseHeaders -> GetIdentityDkimAttributes -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath GetIdentityDkimAttributes where
toPath :: GetIdentityDkimAttributes -> ByteString
toPath = ByteString -> GetIdentityDkimAttributes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery GetIdentityDkimAttributes where
toQuery :: GetIdentityDkimAttributes -> QueryString
toQuery GetIdentityDkimAttributes' {[Text]
$sel:identities:GetIdentityDkimAttributes' :: GetIdentityDkimAttributes -> [Text]
identities :: [Text]
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"GetIdentityDkimAttributes" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"Identities"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"member" [Text]
identities
]
data GetIdentityDkimAttributesResponse = GetIdentityDkimAttributesResponse'
{
GetIdentityDkimAttributesResponse -> Int
httpStatus :: Prelude.Int,
GetIdentityDkimAttributesResponse
-> HashMap Text IdentityDkimAttributes
dkimAttributes :: Prelude.HashMap Prelude.Text IdentityDkimAttributes
}
deriving (GetIdentityDkimAttributesResponse
-> GetIdentityDkimAttributesResponse -> Bool
(GetIdentityDkimAttributesResponse
-> GetIdentityDkimAttributesResponse -> Bool)
-> (GetIdentityDkimAttributesResponse
-> GetIdentityDkimAttributesResponse -> Bool)
-> Eq GetIdentityDkimAttributesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: GetIdentityDkimAttributesResponse
-> GetIdentityDkimAttributesResponse -> Bool
== :: GetIdentityDkimAttributesResponse
-> GetIdentityDkimAttributesResponse -> Bool
$c/= :: GetIdentityDkimAttributesResponse
-> GetIdentityDkimAttributesResponse -> Bool
/= :: GetIdentityDkimAttributesResponse
-> GetIdentityDkimAttributesResponse -> Bool
Prelude.Eq, ReadPrec [GetIdentityDkimAttributesResponse]
ReadPrec GetIdentityDkimAttributesResponse
Int -> ReadS GetIdentityDkimAttributesResponse
ReadS [GetIdentityDkimAttributesResponse]
(Int -> ReadS GetIdentityDkimAttributesResponse)
-> ReadS [GetIdentityDkimAttributesResponse]
-> ReadPrec GetIdentityDkimAttributesResponse
-> ReadPrec [GetIdentityDkimAttributesResponse]
-> Read GetIdentityDkimAttributesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
$creadsPrec :: Int -> ReadS GetIdentityDkimAttributesResponse
readsPrec :: Int -> ReadS GetIdentityDkimAttributesResponse
$creadList :: ReadS [GetIdentityDkimAttributesResponse]
readList :: ReadS [GetIdentityDkimAttributesResponse]
$creadPrec :: ReadPrec GetIdentityDkimAttributesResponse
readPrec :: ReadPrec GetIdentityDkimAttributesResponse
$creadListPrec :: ReadPrec [GetIdentityDkimAttributesResponse]
readListPrec :: ReadPrec [GetIdentityDkimAttributesResponse]
Prelude.Read, Int -> GetIdentityDkimAttributesResponse -> ShowS
[GetIdentityDkimAttributesResponse] -> ShowS
GetIdentityDkimAttributesResponse -> String
(Int -> GetIdentityDkimAttributesResponse -> ShowS)
-> (GetIdentityDkimAttributesResponse -> String)
-> ([GetIdentityDkimAttributesResponse] -> ShowS)
-> Show GetIdentityDkimAttributesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> GetIdentityDkimAttributesResponse -> ShowS
showsPrec :: Int -> GetIdentityDkimAttributesResponse -> ShowS
$cshow :: GetIdentityDkimAttributesResponse -> String
show :: GetIdentityDkimAttributesResponse -> String
$cshowList :: [GetIdentityDkimAttributesResponse] -> ShowS
showList :: [GetIdentityDkimAttributesResponse] -> ShowS
Prelude.Show, (forall x.
GetIdentityDkimAttributesResponse
-> Rep GetIdentityDkimAttributesResponse x)
-> (forall x.
Rep GetIdentityDkimAttributesResponse x
-> GetIdentityDkimAttributesResponse)
-> Generic GetIdentityDkimAttributesResponse
forall x.
Rep GetIdentityDkimAttributesResponse x
-> GetIdentityDkimAttributesResponse
forall x.
GetIdentityDkimAttributesResponse
-> Rep GetIdentityDkimAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x.
GetIdentityDkimAttributesResponse
-> Rep GetIdentityDkimAttributesResponse x
from :: forall x.
GetIdentityDkimAttributesResponse
-> Rep GetIdentityDkimAttributesResponse x
$cto :: forall x.
Rep GetIdentityDkimAttributesResponse x
-> GetIdentityDkimAttributesResponse
to :: forall x.
Rep GetIdentityDkimAttributesResponse x
-> GetIdentityDkimAttributesResponse
Prelude.Generic)
newGetIdentityDkimAttributesResponse ::
Prelude.Int ->
GetIdentityDkimAttributesResponse
newGetIdentityDkimAttributesResponse :: Int -> GetIdentityDkimAttributesResponse
newGetIdentityDkimAttributesResponse Int
pHttpStatus_ =
GetIdentityDkimAttributesResponse'
{ $sel:httpStatus:GetIdentityDkimAttributesResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:dkimAttributes:GetIdentityDkimAttributesResponse' :: HashMap Text IdentityDkimAttributes
dkimAttributes = HashMap Text IdentityDkimAttributes
forall a. Monoid a => a
Prelude.mempty
}
getIdentityDkimAttributesResponse_httpStatus :: Lens.Lens' GetIdentityDkimAttributesResponse Prelude.Int
getIdentityDkimAttributesResponse_httpStatus :: Lens' GetIdentityDkimAttributesResponse Int
getIdentityDkimAttributesResponse_httpStatus = (GetIdentityDkimAttributesResponse -> Int)
-> (GetIdentityDkimAttributesResponse
-> Int -> GetIdentityDkimAttributesResponse)
-> Lens' GetIdentityDkimAttributesResponse Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIdentityDkimAttributesResponse' {Int
$sel:httpStatus:GetIdentityDkimAttributesResponse' :: GetIdentityDkimAttributesResponse -> Int
httpStatus :: Int
httpStatus} -> Int
httpStatus) (\s :: GetIdentityDkimAttributesResponse
s@GetIdentityDkimAttributesResponse' {} Int
a -> GetIdentityDkimAttributesResponse
s {httpStatus = a} :: GetIdentityDkimAttributesResponse)
getIdentityDkimAttributesResponse_dkimAttributes :: Lens.Lens' GetIdentityDkimAttributesResponse (Prelude.HashMap Prelude.Text IdentityDkimAttributes)
getIdentityDkimAttributesResponse_dkimAttributes :: Lens'
GetIdentityDkimAttributesResponse
(HashMap Text IdentityDkimAttributes)
getIdentityDkimAttributesResponse_dkimAttributes = (GetIdentityDkimAttributesResponse
-> HashMap Text IdentityDkimAttributes)
-> (GetIdentityDkimAttributesResponse
-> HashMap Text IdentityDkimAttributes
-> GetIdentityDkimAttributesResponse)
-> Lens'
GetIdentityDkimAttributesResponse
(HashMap Text IdentityDkimAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIdentityDkimAttributesResponse' {HashMap Text IdentityDkimAttributes
$sel:dkimAttributes:GetIdentityDkimAttributesResponse' :: GetIdentityDkimAttributesResponse
-> HashMap Text IdentityDkimAttributes
dkimAttributes :: HashMap Text IdentityDkimAttributes
dkimAttributes} -> HashMap Text IdentityDkimAttributes
dkimAttributes) (\s :: GetIdentityDkimAttributesResponse
s@GetIdentityDkimAttributesResponse' {} HashMap Text IdentityDkimAttributes
a -> GetIdentityDkimAttributesResponse
s {dkimAttributes = a} :: GetIdentityDkimAttributesResponse) ((HashMap Text IdentityDkimAttributes
-> f (HashMap Text IdentityDkimAttributes))
-> GetIdentityDkimAttributesResponse
-> f GetIdentityDkimAttributesResponse)
-> ((HashMap Text IdentityDkimAttributes
-> f (HashMap Text IdentityDkimAttributes))
-> HashMap Text IdentityDkimAttributes
-> f (HashMap Text IdentityDkimAttributes))
-> (HashMap Text IdentityDkimAttributes
-> f (HashMap Text IdentityDkimAttributes))
-> GetIdentityDkimAttributesResponse
-> f GetIdentityDkimAttributesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text IdentityDkimAttributes
-> f (HashMap Text IdentityDkimAttributes))
-> HashMap Text IdentityDkimAttributes
-> f (HashMap Text IdentityDkimAttributes)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Iso
(HashMap Text IdentityDkimAttributes)
(HashMap Text IdentityDkimAttributes)
(HashMap Text IdentityDkimAttributes)
(HashMap Text IdentityDkimAttributes)
Lens.coerced
instance
Prelude.NFData
GetIdentityDkimAttributesResponse
where
rnf :: GetIdentityDkimAttributesResponse -> ()
rnf GetIdentityDkimAttributesResponse' {Int
HashMap Text IdentityDkimAttributes
$sel:httpStatus:GetIdentityDkimAttributesResponse' :: GetIdentityDkimAttributesResponse -> Int
$sel:dkimAttributes:GetIdentityDkimAttributesResponse' :: GetIdentityDkimAttributesResponse
-> HashMap Text IdentityDkimAttributes
httpStatus :: Int
dkimAttributes :: HashMap Text IdentityDkimAttributes
..} =
Int -> ()
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
() -> () -> ()
forall a b. a -> b -> b
`Prelude.seq` HashMap Text IdentityDkimAttributes -> ()
forall a. NFData a => a -> ()
Prelude.rnf HashMap Text IdentityDkimAttributes
dkimAttributes