{-# 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.Lens as Lens
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
/= :: GetIdentityDkimAttributes -> GetIdentityDkimAttributes -> Bool
$c/= :: GetIdentityDkimAttributes -> GetIdentityDkimAttributes -> Bool
== :: GetIdentityDkimAttributes -> GetIdentityDkimAttributes -> Bool
$c== :: 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
readListPrec :: ReadPrec [GetIdentityDkimAttributes]
$creadListPrec :: ReadPrec [GetIdentityDkimAttributes]
readPrec :: ReadPrec GetIdentityDkimAttributes
$creadPrec :: ReadPrec GetIdentityDkimAttributes
readList :: ReadS [GetIdentityDkimAttributes]
$creadList :: ReadS [GetIdentityDkimAttributes]
readsPrec :: Int -> ReadS GetIdentityDkimAttributes
$creadsPrec :: Int -> ReadS 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
showList :: [GetIdentityDkimAttributes] -> ShowS
$cshowList :: [GetIdentityDkimAttributes] -> ShowS
show :: GetIdentityDkimAttributes -> String
$cshow :: GetIdentityDkimAttributes -> String
showsPrec :: Int -> GetIdentityDkimAttributes -> ShowS
$cshowsPrec :: Int -> 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
$cto :: forall x.
Rep GetIdentityDkimAttributes x -> GetIdentityDkimAttributes
$cfrom :: forall x.
GetIdentityDkimAttributes -> Rep GetIdentityDkimAttributes x
Prelude.Generic)
newGetIdentityDkimAttributes ::
GetIdentityDkimAttributes
newGetIdentityDkimAttributes :: GetIdentityDkimAttributes
newGetIdentityDkimAttributes =
GetIdentityDkimAttributes' :: [Text] -> GetIdentityDkimAttributes
GetIdentityDkimAttributes'
{ $sel:identities:GetIdentityDkimAttributes' :: [Text]
identities =
[Text]
forall a. Monoid a => a
Prelude.mempty
}
getIdentityDkimAttributes_identities :: Lens.Lens' GetIdentityDkimAttributes [Prelude.Text]
getIdentityDkimAttributes_identities :: ([Text] -> f [Text])
-> GetIdentityDkimAttributes -> f GetIdentityDkimAttributes
getIdentityDkimAttributes_identities = (GetIdentityDkimAttributes -> [Text])
-> (GetIdentityDkimAttributes
-> [Text] -> GetIdentityDkimAttributes)
-> Lens
GetIdentityDkimAttributes GetIdentityDkimAttributes [Text] [Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIdentityDkimAttributes' {[Text]
identities :: [Text]
$sel:identities:GetIdentityDkimAttributes' :: GetIdentityDkimAttributes -> [Text]
identities} -> [Text]
identities) (\s :: GetIdentityDkimAttributes
s@GetIdentityDkimAttributes' {} [Text]
a -> GetIdentityDkimAttributes
s {$sel:identities:GetIdentityDkimAttributes' :: [Text]
identities = [Text]
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
Lens.coerced
instance Core.AWSRequest GetIdentityDkimAttributes where
type
AWSResponse GetIdentityDkimAttributes =
GetIdentityDkimAttributesResponse
request :: GetIdentityDkimAttributes -> Request GetIdentityDkimAttributes
request = Service
-> GetIdentityDkimAttributes -> Request GetIdentityDkimAttributes
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy GetIdentityDkimAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetIdentityDkimAttributes)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse GetIdentityDkimAttributes))
-> Logger
-> Service
-> Proxy GetIdentityDkimAttributes
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetIdentityDkimAttributes)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> 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 (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 (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)
Core..@? 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 (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)
Core.parseXMLMap Text
"entry" Text
"key" Text
"value"
)
)
instance Prelude.Hashable GetIdentityDkimAttributes
instance Prelude.NFData GetIdentityDkimAttributes
instance Core.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 Core.ToPath GetIdentityDkimAttributes where
toPath :: GetIdentityDkimAttributes -> ByteString
toPath = ByteString -> GetIdentityDkimAttributes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetIdentityDkimAttributes where
toQuery :: GetIdentityDkimAttributes -> QueryString
toQuery GetIdentityDkimAttributes' {[Text]
identities :: [Text]
$sel:identities:GetIdentityDkimAttributes' :: GetIdentityDkimAttributes -> [Text]
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"GetIdentityDkimAttributes" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-12-01" :: Prelude.ByteString),
ByteString
"Identities"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.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
/= :: GetIdentityDkimAttributesResponse
-> GetIdentityDkimAttributesResponse -> Bool
$c/= :: GetIdentityDkimAttributesResponse
-> GetIdentityDkimAttributesResponse -> Bool
== :: GetIdentityDkimAttributesResponse
-> GetIdentityDkimAttributesResponse -> Bool
$c== :: 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
readListPrec :: ReadPrec [GetIdentityDkimAttributesResponse]
$creadListPrec :: ReadPrec [GetIdentityDkimAttributesResponse]
readPrec :: ReadPrec GetIdentityDkimAttributesResponse
$creadPrec :: ReadPrec GetIdentityDkimAttributesResponse
readList :: ReadS [GetIdentityDkimAttributesResponse]
$creadList :: ReadS [GetIdentityDkimAttributesResponse]
readsPrec :: Int -> ReadS GetIdentityDkimAttributesResponse
$creadsPrec :: Int -> ReadS 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
showList :: [GetIdentityDkimAttributesResponse] -> ShowS
$cshowList :: [GetIdentityDkimAttributesResponse] -> ShowS
show :: GetIdentityDkimAttributesResponse -> String
$cshow :: GetIdentityDkimAttributesResponse -> String
showsPrec :: Int -> GetIdentityDkimAttributesResponse -> ShowS
$cshowsPrec :: Int -> 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
$cto :: forall x.
Rep GetIdentityDkimAttributesResponse x
-> GetIdentityDkimAttributesResponse
$cfrom :: forall x.
GetIdentityDkimAttributesResponse
-> Rep GetIdentityDkimAttributesResponse x
Prelude.Generic)
newGetIdentityDkimAttributesResponse ::
Prelude.Int ->
GetIdentityDkimAttributesResponse
newGetIdentityDkimAttributesResponse :: Int -> GetIdentityDkimAttributesResponse
newGetIdentityDkimAttributesResponse Int
pHttpStatus_ =
GetIdentityDkimAttributesResponse' :: Int
-> HashMap Text IdentityDkimAttributes
-> GetIdentityDkimAttributesResponse
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 :: (Int -> f Int)
-> GetIdentityDkimAttributesResponse
-> f GetIdentityDkimAttributesResponse
getIdentityDkimAttributesResponse_httpStatus = (GetIdentityDkimAttributesResponse -> Int)
-> (GetIdentityDkimAttributesResponse
-> Int -> GetIdentityDkimAttributesResponse)
-> Lens
GetIdentityDkimAttributesResponse
GetIdentityDkimAttributesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIdentityDkimAttributesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetIdentityDkimAttributesResponse' :: GetIdentityDkimAttributesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetIdentityDkimAttributesResponse
s@GetIdentityDkimAttributesResponse' {} Int
a -> GetIdentityDkimAttributesResponse
s {$sel:httpStatus:GetIdentityDkimAttributesResponse' :: Int
httpStatus = Int
a} :: GetIdentityDkimAttributesResponse)
getIdentityDkimAttributesResponse_dkimAttributes :: Lens.Lens' GetIdentityDkimAttributesResponse (Prelude.HashMap Prelude.Text IdentityDkimAttributes)
getIdentityDkimAttributesResponse_dkimAttributes :: (HashMap Text IdentityDkimAttributes
-> f (HashMap Text IdentityDkimAttributes))
-> GetIdentityDkimAttributesResponse
-> f GetIdentityDkimAttributesResponse
getIdentityDkimAttributesResponse_dkimAttributes = (GetIdentityDkimAttributesResponse
-> HashMap Text IdentityDkimAttributes)
-> (GetIdentityDkimAttributesResponse
-> HashMap Text IdentityDkimAttributes
-> GetIdentityDkimAttributesResponse)
-> Lens
GetIdentityDkimAttributesResponse
GetIdentityDkimAttributesResponse
(HashMap Text IdentityDkimAttributes)
(HashMap Text IdentityDkimAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIdentityDkimAttributesResponse' {HashMap Text IdentityDkimAttributes
dkimAttributes :: HashMap Text IdentityDkimAttributes
$sel:dkimAttributes:GetIdentityDkimAttributesResponse' :: GetIdentityDkimAttributesResponse
-> HashMap Text IdentityDkimAttributes
dkimAttributes} -> HashMap Text IdentityDkimAttributes
dkimAttributes) (\s :: GetIdentityDkimAttributesResponse
s@GetIdentityDkimAttributesResponse' {} HashMap Text IdentityDkimAttributes
a -> GetIdentityDkimAttributesResponse
s {$sel:dkimAttributes:GetIdentityDkimAttributesResponse' :: HashMap Text IdentityDkimAttributes
dkimAttributes = HashMap Text IdentityDkimAttributes
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
Lens.coerced
instance
Prelude.NFData
GetIdentityDkimAttributesResponse