{-# 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.GetIdentityVerificationAttributes
(
GetIdentityVerificationAttributes (..),
newGetIdentityVerificationAttributes,
getIdentityVerificationAttributes_identities,
GetIdentityVerificationAttributesResponse (..),
newGetIdentityVerificationAttributesResponse,
getIdentityVerificationAttributesResponse_httpStatus,
getIdentityVerificationAttributesResponse_verificationAttributes,
)
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 GetIdentityVerificationAttributes = GetIdentityVerificationAttributes'
{
GetIdentityVerificationAttributes -> [Text]
identities :: [Prelude.Text]
}
deriving (GetIdentityVerificationAttributes
-> GetIdentityVerificationAttributes -> Bool
(GetIdentityVerificationAttributes
-> GetIdentityVerificationAttributes -> Bool)
-> (GetIdentityVerificationAttributes
-> GetIdentityVerificationAttributes -> Bool)
-> Eq GetIdentityVerificationAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetIdentityVerificationAttributes
-> GetIdentityVerificationAttributes -> Bool
$c/= :: GetIdentityVerificationAttributes
-> GetIdentityVerificationAttributes -> Bool
== :: GetIdentityVerificationAttributes
-> GetIdentityVerificationAttributes -> Bool
$c== :: GetIdentityVerificationAttributes
-> GetIdentityVerificationAttributes -> Bool
Prelude.Eq, ReadPrec [GetIdentityVerificationAttributes]
ReadPrec GetIdentityVerificationAttributes
Int -> ReadS GetIdentityVerificationAttributes
ReadS [GetIdentityVerificationAttributes]
(Int -> ReadS GetIdentityVerificationAttributes)
-> ReadS [GetIdentityVerificationAttributes]
-> ReadPrec GetIdentityVerificationAttributes
-> ReadPrec [GetIdentityVerificationAttributes]
-> Read GetIdentityVerificationAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetIdentityVerificationAttributes]
$creadListPrec :: ReadPrec [GetIdentityVerificationAttributes]
readPrec :: ReadPrec GetIdentityVerificationAttributes
$creadPrec :: ReadPrec GetIdentityVerificationAttributes
readList :: ReadS [GetIdentityVerificationAttributes]
$creadList :: ReadS [GetIdentityVerificationAttributes]
readsPrec :: Int -> ReadS GetIdentityVerificationAttributes
$creadsPrec :: Int -> ReadS GetIdentityVerificationAttributes
Prelude.Read, Int -> GetIdentityVerificationAttributes -> ShowS
[GetIdentityVerificationAttributes] -> ShowS
GetIdentityVerificationAttributes -> String
(Int -> GetIdentityVerificationAttributes -> ShowS)
-> (GetIdentityVerificationAttributes -> String)
-> ([GetIdentityVerificationAttributes] -> ShowS)
-> Show GetIdentityVerificationAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetIdentityVerificationAttributes] -> ShowS
$cshowList :: [GetIdentityVerificationAttributes] -> ShowS
show :: GetIdentityVerificationAttributes -> String
$cshow :: GetIdentityVerificationAttributes -> String
showsPrec :: Int -> GetIdentityVerificationAttributes -> ShowS
$cshowsPrec :: Int -> GetIdentityVerificationAttributes -> ShowS
Prelude.Show, (forall x.
GetIdentityVerificationAttributes
-> Rep GetIdentityVerificationAttributes x)
-> (forall x.
Rep GetIdentityVerificationAttributes x
-> GetIdentityVerificationAttributes)
-> Generic GetIdentityVerificationAttributes
forall x.
Rep GetIdentityVerificationAttributes x
-> GetIdentityVerificationAttributes
forall x.
GetIdentityVerificationAttributes
-> Rep GetIdentityVerificationAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetIdentityVerificationAttributes x
-> GetIdentityVerificationAttributes
$cfrom :: forall x.
GetIdentityVerificationAttributes
-> Rep GetIdentityVerificationAttributes x
Prelude.Generic)
newGetIdentityVerificationAttributes ::
GetIdentityVerificationAttributes
newGetIdentityVerificationAttributes :: GetIdentityVerificationAttributes
newGetIdentityVerificationAttributes =
GetIdentityVerificationAttributes' :: [Text] -> GetIdentityVerificationAttributes
GetIdentityVerificationAttributes'
{ $sel:identities:GetIdentityVerificationAttributes' :: [Text]
identities =
[Text]
forall a. Monoid a => a
Prelude.mempty
}
getIdentityVerificationAttributes_identities :: Lens.Lens' GetIdentityVerificationAttributes [Prelude.Text]
getIdentityVerificationAttributes_identities :: ([Text] -> f [Text])
-> GetIdentityVerificationAttributes
-> f GetIdentityVerificationAttributes
getIdentityVerificationAttributes_identities = (GetIdentityVerificationAttributes -> [Text])
-> (GetIdentityVerificationAttributes
-> [Text] -> GetIdentityVerificationAttributes)
-> Lens
GetIdentityVerificationAttributes
GetIdentityVerificationAttributes
[Text]
[Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIdentityVerificationAttributes' {[Text]
identities :: [Text]
$sel:identities:GetIdentityVerificationAttributes' :: GetIdentityVerificationAttributes -> [Text]
identities} -> [Text]
identities) (\s :: GetIdentityVerificationAttributes
s@GetIdentityVerificationAttributes' {} [Text]
a -> GetIdentityVerificationAttributes
s {$sel:identities:GetIdentityVerificationAttributes' :: [Text]
identities = [Text]
a} :: GetIdentityVerificationAttributes) (([Text] -> f [Text])
-> GetIdentityVerificationAttributes
-> f GetIdentityVerificationAttributes)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> GetIdentityVerificationAttributes
-> f GetIdentityVerificationAttributes
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
GetIdentityVerificationAttributes
where
type
AWSResponse GetIdentityVerificationAttributes =
GetIdentityVerificationAttributesResponse
request :: GetIdentityVerificationAttributes
-> Request GetIdentityVerificationAttributes
request = Service
-> GetIdentityVerificationAttributes
-> Request GetIdentityVerificationAttributes
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy GetIdentityVerificationAttributes
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetIdentityVerificationAttributes)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse GetIdentityVerificationAttributes))
-> Logger
-> Service
-> Proxy GetIdentityVerificationAttributes
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GetIdentityVerificationAttributes)))
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
"GetIdentityVerificationAttributesResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int
-> HashMap Text IdentityVerificationAttributes
-> GetIdentityVerificationAttributesResponse
GetIdentityVerificationAttributesResponse'
(Int
-> HashMap Text IdentityVerificationAttributes
-> GetIdentityVerificationAttributesResponse)
-> Either String Int
-> Either
String
(HashMap Text IdentityVerificationAttributes
-> GetIdentityVerificationAttributesResponse)
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 IdentityVerificationAttributes
-> GetIdentityVerificationAttributesResponse)
-> Either String (HashMap Text IdentityVerificationAttributes)
-> Either String GetIdentityVerificationAttributesResponse
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
"VerificationAttributes"
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 IdentityVerificationAttributes))
-> Either String (HashMap Text IdentityVerificationAttributes)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text
-> Text
-> Text
-> [Node]
-> Either String (HashMap Text IdentityVerificationAttributes)
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
GetIdentityVerificationAttributes
instance
Prelude.NFData
GetIdentityVerificationAttributes
instance
Core.ToHeaders
GetIdentityVerificationAttributes
where
toHeaders :: GetIdentityVerificationAttributes -> ResponseHeaders
toHeaders = ResponseHeaders
-> GetIdentityVerificationAttributes -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance
Core.ToPath
GetIdentityVerificationAttributes
where
toPath :: GetIdentityVerificationAttributes -> ByteString
toPath = ByteString -> GetIdentityVerificationAttributes -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
GetIdentityVerificationAttributes
where
toQuery :: GetIdentityVerificationAttributes -> QueryString
toQuery GetIdentityVerificationAttributes' {[Text]
identities :: [Text]
$sel:identities:GetIdentityVerificationAttributes' :: GetIdentityVerificationAttributes -> [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
"GetIdentityVerificationAttributes" ::
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 GetIdentityVerificationAttributesResponse = GetIdentityVerificationAttributesResponse'
{
GetIdentityVerificationAttributesResponse -> Int
httpStatus :: Prelude.Int,
GetIdentityVerificationAttributesResponse
-> HashMap Text IdentityVerificationAttributes
verificationAttributes :: Prelude.HashMap Prelude.Text IdentityVerificationAttributes
}
deriving (GetIdentityVerificationAttributesResponse
-> GetIdentityVerificationAttributesResponse -> Bool
(GetIdentityVerificationAttributesResponse
-> GetIdentityVerificationAttributesResponse -> Bool)
-> (GetIdentityVerificationAttributesResponse
-> GetIdentityVerificationAttributesResponse -> Bool)
-> Eq GetIdentityVerificationAttributesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetIdentityVerificationAttributesResponse
-> GetIdentityVerificationAttributesResponse -> Bool
$c/= :: GetIdentityVerificationAttributesResponse
-> GetIdentityVerificationAttributesResponse -> Bool
== :: GetIdentityVerificationAttributesResponse
-> GetIdentityVerificationAttributesResponse -> Bool
$c== :: GetIdentityVerificationAttributesResponse
-> GetIdentityVerificationAttributesResponse -> Bool
Prelude.Eq, ReadPrec [GetIdentityVerificationAttributesResponse]
ReadPrec GetIdentityVerificationAttributesResponse
Int -> ReadS GetIdentityVerificationAttributesResponse
ReadS [GetIdentityVerificationAttributesResponse]
(Int -> ReadS GetIdentityVerificationAttributesResponse)
-> ReadS [GetIdentityVerificationAttributesResponse]
-> ReadPrec GetIdentityVerificationAttributesResponse
-> ReadPrec [GetIdentityVerificationAttributesResponse]
-> Read GetIdentityVerificationAttributesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetIdentityVerificationAttributesResponse]
$creadListPrec :: ReadPrec [GetIdentityVerificationAttributesResponse]
readPrec :: ReadPrec GetIdentityVerificationAttributesResponse
$creadPrec :: ReadPrec GetIdentityVerificationAttributesResponse
readList :: ReadS [GetIdentityVerificationAttributesResponse]
$creadList :: ReadS [GetIdentityVerificationAttributesResponse]
readsPrec :: Int -> ReadS GetIdentityVerificationAttributesResponse
$creadsPrec :: Int -> ReadS GetIdentityVerificationAttributesResponse
Prelude.Read, Int -> GetIdentityVerificationAttributesResponse -> ShowS
[GetIdentityVerificationAttributesResponse] -> ShowS
GetIdentityVerificationAttributesResponse -> String
(Int -> GetIdentityVerificationAttributesResponse -> ShowS)
-> (GetIdentityVerificationAttributesResponse -> String)
-> ([GetIdentityVerificationAttributesResponse] -> ShowS)
-> Show GetIdentityVerificationAttributesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetIdentityVerificationAttributesResponse] -> ShowS
$cshowList :: [GetIdentityVerificationAttributesResponse] -> ShowS
show :: GetIdentityVerificationAttributesResponse -> String
$cshow :: GetIdentityVerificationAttributesResponse -> String
showsPrec :: Int -> GetIdentityVerificationAttributesResponse -> ShowS
$cshowsPrec :: Int -> GetIdentityVerificationAttributesResponse -> ShowS
Prelude.Show, (forall x.
GetIdentityVerificationAttributesResponse
-> Rep GetIdentityVerificationAttributesResponse x)
-> (forall x.
Rep GetIdentityVerificationAttributesResponse x
-> GetIdentityVerificationAttributesResponse)
-> Generic GetIdentityVerificationAttributesResponse
forall x.
Rep GetIdentityVerificationAttributesResponse x
-> GetIdentityVerificationAttributesResponse
forall x.
GetIdentityVerificationAttributesResponse
-> Rep GetIdentityVerificationAttributesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetIdentityVerificationAttributesResponse x
-> GetIdentityVerificationAttributesResponse
$cfrom :: forall x.
GetIdentityVerificationAttributesResponse
-> Rep GetIdentityVerificationAttributesResponse x
Prelude.Generic)
newGetIdentityVerificationAttributesResponse ::
Prelude.Int ->
GetIdentityVerificationAttributesResponse
newGetIdentityVerificationAttributesResponse :: Int -> GetIdentityVerificationAttributesResponse
newGetIdentityVerificationAttributesResponse
Int
pHttpStatus_ =
GetIdentityVerificationAttributesResponse' :: Int
-> HashMap Text IdentityVerificationAttributes
-> GetIdentityVerificationAttributesResponse
GetIdentityVerificationAttributesResponse'
{ $sel:httpStatus:GetIdentityVerificationAttributesResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:verificationAttributes:GetIdentityVerificationAttributesResponse' :: HashMap Text IdentityVerificationAttributes
verificationAttributes =
HashMap Text IdentityVerificationAttributes
forall a. Monoid a => a
Prelude.mempty
}
getIdentityVerificationAttributesResponse_httpStatus :: Lens.Lens' GetIdentityVerificationAttributesResponse Prelude.Int
getIdentityVerificationAttributesResponse_httpStatus :: (Int -> f Int)
-> GetIdentityVerificationAttributesResponse
-> f GetIdentityVerificationAttributesResponse
getIdentityVerificationAttributesResponse_httpStatus = (GetIdentityVerificationAttributesResponse -> Int)
-> (GetIdentityVerificationAttributesResponse
-> Int -> GetIdentityVerificationAttributesResponse)
-> Lens
GetIdentityVerificationAttributesResponse
GetIdentityVerificationAttributesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIdentityVerificationAttributesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetIdentityVerificationAttributesResponse' :: GetIdentityVerificationAttributesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetIdentityVerificationAttributesResponse
s@GetIdentityVerificationAttributesResponse' {} Int
a -> GetIdentityVerificationAttributesResponse
s {$sel:httpStatus:GetIdentityVerificationAttributesResponse' :: Int
httpStatus = Int
a} :: GetIdentityVerificationAttributesResponse)
getIdentityVerificationAttributesResponse_verificationAttributes :: Lens.Lens' GetIdentityVerificationAttributesResponse (Prelude.HashMap Prelude.Text IdentityVerificationAttributes)
getIdentityVerificationAttributesResponse_verificationAttributes :: (HashMap Text IdentityVerificationAttributes
-> f (HashMap Text IdentityVerificationAttributes))
-> GetIdentityVerificationAttributesResponse
-> f GetIdentityVerificationAttributesResponse
getIdentityVerificationAttributesResponse_verificationAttributes = (GetIdentityVerificationAttributesResponse
-> HashMap Text IdentityVerificationAttributes)
-> (GetIdentityVerificationAttributesResponse
-> HashMap Text IdentityVerificationAttributes
-> GetIdentityVerificationAttributesResponse)
-> Lens
GetIdentityVerificationAttributesResponse
GetIdentityVerificationAttributesResponse
(HashMap Text IdentityVerificationAttributes)
(HashMap Text IdentityVerificationAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetIdentityVerificationAttributesResponse' {HashMap Text IdentityVerificationAttributes
verificationAttributes :: HashMap Text IdentityVerificationAttributes
$sel:verificationAttributes:GetIdentityVerificationAttributesResponse' :: GetIdentityVerificationAttributesResponse
-> HashMap Text IdentityVerificationAttributes
verificationAttributes} -> HashMap Text IdentityVerificationAttributes
verificationAttributes) (\s :: GetIdentityVerificationAttributesResponse
s@GetIdentityVerificationAttributesResponse' {} HashMap Text IdentityVerificationAttributes
a -> GetIdentityVerificationAttributesResponse
s {$sel:verificationAttributes:GetIdentityVerificationAttributesResponse' :: HashMap Text IdentityVerificationAttributes
verificationAttributes = HashMap Text IdentityVerificationAttributes
a} :: GetIdentityVerificationAttributesResponse) ((HashMap Text IdentityVerificationAttributes
-> f (HashMap Text IdentityVerificationAttributes))
-> GetIdentityVerificationAttributesResponse
-> f GetIdentityVerificationAttributesResponse)
-> ((HashMap Text IdentityVerificationAttributes
-> f (HashMap Text IdentityVerificationAttributes))
-> HashMap Text IdentityVerificationAttributes
-> f (HashMap Text IdentityVerificationAttributes))
-> (HashMap Text IdentityVerificationAttributes
-> f (HashMap Text IdentityVerificationAttributes))
-> GetIdentityVerificationAttributesResponse
-> f GetIdentityVerificationAttributesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text IdentityVerificationAttributes
-> f (HashMap Text IdentityVerificationAttributes))
-> HashMap Text IdentityVerificationAttributes
-> f (HashMap Text IdentityVerificationAttributes)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Prelude.NFData
GetIdentityVerificationAttributesResponse