{-# 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.VoiceId.DescribeFraudsterRegistrationJob
(
DescribeFraudsterRegistrationJob (..),
newDescribeFraudsterRegistrationJob,
describeFraudsterRegistrationJob_domainId,
describeFraudsterRegistrationJob_jobId,
DescribeFraudsterRegistrationJobResponse (..),
newDescribeFraudsterRegistrationJobResponse,
describeFraudsterRegistrationJobResponse_job,
describeFraudsterRegistrationJobResponse_httpStatus,
)
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.VoiceId.Types
data DescribeFraudsterRegistrationJob = DescribeFraudsterRegistrationJob'
{
DescribeFraudsterRegistrationJob -> Text
domainId :: Prelude.Text,
DescribeFraudsterRegistrationJob -> Text
jobId :: Prelude.Text
}
deriving (DescribeFraudsterRegistrationJob
-> DescribeFraudsterRegistrationJob -> Bool
(DescribeFraudsterRegistrationJob
-> DescribeFraudsterRegistrationJob -> Bool)
-> (DescribeFraudsterRegistrationJob
-> DescribeFraudsterRegistrationJob -> Bool)
-> Eq DescribeFraudsterRegistrationJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFraudsterRegistrationJob
-> DescribeFraudsterRegistrationJob -> Bool
$c/= :: DescribeFraudsterRegistrationJob
-> DescribeFraudsterRegistrationJob -> Bool
== :: DescribeFraudsterRegistrationJob
-> DescribeFraudsterRegistrationJob -> Bool
$c== :: DescribeFraudsterRegistrationJob
-> DescribeFraudsterRegistrationJob -> Bool
Prelude.Eq, ReadPrec [DescribeFraudsterRegistrationJob]
ReadPrec DescribeFraudsterRegistrationJob
Int -> ReadS DescribeFraudsterRegistrationJob
ReadS [DescribeFraudsterRegistrationJob]
(Int -> ReadS DescribeFraudsterRegistrationJob)
-> ReadS [DescribeFraudsterRegistrationJob]
-> ReadPrec DescribeFraudsterRegistrationJob
-> ReadPrec [DescribeFraudsterRegistrationJob]
-> Read DescribeFraudsterRegistrationJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeFraudsterRegistrationJob]
$creadListPrec :: ReadPrec [DescribeFraudsterRegistrationJob]
readPrec :: ReadPrec DescribeFraudsterRegistrationJob
$creadPrec :: ReadPrec DescribeFraudsterRegistrationJob
readList :: ReadS [DescribeFraudsterRegistrationJob]
$creadList :: ReadS [DescribeFraudsterRegistrationJob]
readsPrec :: Int -> ReadS DescribeFraudsterRegistrationJob
$creadsPrec :: Int -> ReadS DescribeFraudsterRegistrationJob
Prelude.Read, Int -> DescribeFraudsterRegistrationJob -> ShowS
[DescribeFraudsterRegistrationJob] -> ShowS
DescribeFraudsterRegistrationJob -> String
(Int -> DescribeFraudsterRegistrationJob -> ShowS)
-> (DescribeFraudsterRegistrationJob -> String)
-> ([DescribeFraudsterRegistrationJob] -> ShowS)
-> Show DescribeFraudsterRegistrationJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFraudsterRegistrationJob] -> ShowS
$cshowList :: [DescribeFraudsterRegistrationJob] -> ShowS
show :: DescribeFraudsterRegistrationJob -> String
$cshow :: DescribeFraudsterRegistrationJob -> String
showsPrec :: Int -> DescribeFraudsterRegistrationJob -> ShowS
$cshowsPrec :: Int -> DescribeFraudsterRegistrationJob -> ShowS
Prelude.Show, (forall x.
DescribeFraudsterRegistrationJob
-> Rep DescribeFraudsterRegistrationJob x)
-> (forall x.
Rep DescribeFraudsterRegistrationJob x
-> DescribeFraudsterRegistrationJob)
-> Generic DescribeFraudsterRegistrationJob
forall x.
Rep DescribeFraudsterRegistrationJob x
-> DescribeFraudsterRegistrationJob
forall x.
DescribeFraudsterRegistrationJob
-> Rep DescribeFraudsterRegistrationJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFraudsterRegistrationJob x
-> DescribeFraudsterRegistrationJob
$cfrom :: forall x.
DescribeFraudsterRegistrationJob
-> Rep DescribeFraudsterRegistrationJob x
Prelude.Generic)
newDescribeFraudsterRegistrationJob ::
Prelude.Text ->
Prelude.Text ->
DescribeFraudsterRegistrationJob
newDescribeFraudsterRegistrationJob :: Text -> Text -> DescribeFraudsterRegistrationJob
newDescribeFraudsterRegistrationJob
Text
pDomainId_
Text
pJobId_ =
DescribeFraudsterRegistrationJob' :: Text -> Text -> DescribeFraudsterRegistrationJob
DescribeFraudsterRegistrationJob'
{ $sel:domainId:DescribeFraudsterRegistrationJob' :: Text
domainId =
Text
pDomainId_,
$sel:jobId:DescribeFraudsterRegistrationJob' :: Text
jobId = Text
pJobId_
}
describeFraudsterRegistrationJob_domainId :: Lens.Lens' DescribeFraudsterRegistrationJob Prelude.Text
describeFraudsterRegistrationJob_domainId :: (Text -> f Text)
-> DescribeFraudsterRegistrationJob
-> f DescribeFraudsterRegistrationJob
describeFraudsterRegistrationJob_domainId = (DescribeFraudsterRegistrationJob -> Text)
-> (DescribeFraudsterRegistrationJob
-> Text -> DescribeFraudsterRegistrationJob)
-> Lens
DescribeFraudsterRegistrationJob
DescribeFraudsterRegistrationJob
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFraudsterRegistrationJob' {Text
domainId :: Text
$sel:domainId:DescribeFraudsterRegistrationJob' :: DescribeFraudsterRegistrationJob -> Text
domainId} -> Text
domainId) (\s :: DescribeFraudsterRegistrationJob
s@DescribeFraudsterRegistrationJob' {} Text
a -> DescribeFraudsterRegistrationJob
s {$sel:domainId:DescribeFraudsterRegistrationJob' :: Text
domainId = Text
a} :: DescribeFraudsterRegistrationJob)
describeFraudsterRegistrationJob_jobId :: Lens.Lens' DescribeFraudsterRegistrationJob Prelude.Text
describeFraudsterRegistrationJob_jobId :: (Text -> f Text)
-> DescribeFraudsterRegistrationJob
-> f DescribeFraudsterRegistrationJob
describeFraudsterRegistrationJob_jobId = (DescribeFraudsterRegistrationJob -> Text)
-> (DescribeFraudsterRegistrationJob
-> Text -> DescribeFraudsterRegistrationJob)
-> Lens
DescribeFraudsterRegistrationJob
DescribeFraudsterRegistrationJob
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFraudsterRegistrationJob' {Text
jobId :: Text
$sel:jobId:DescribeFraudsterRegistrationJob' :: DescribeFraudsterRegistrationJob -> Text
jobId} -> Text
jobId) (\s :: DescribeFraudsterRegistrationJob
s@DescribeFraudsterRegistrationJob' {} Text
a -> DescribeFraudsterRegistrationJob
s {$sel:jobId:DescribeFraudsterRegistrationJob' :: Text
jobId = Text
a} :: DescribeFraudsterRegistrationJob)
instance
Core.AWSRequest
DescribeFraudsterRegistrationJob
where
type
AWSResponse DescribeFraudsterRegistrationJob =
DescribeFraudsterRegistrationJobResponse
request :: DescribeFraudsterRegistrationJob
-> Request DescribeFraudsterRegistrationJob
request = Service
-> DescribeFraudsterRegistrationJob
-> Request DescribeFraudsterRegistrationJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeFraudsterRegistrationJob
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeFraudsterRegistrationJob)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeFraudsterRegistrationJob))
-> Logger
-> Service
-> Proxy DescribeFraudsterRegistrationJob
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DescribeFraudsterRegistrationJob)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe FraudsterRegistrationJob
-> Int -> DescribeFraudsterRegistrationJobResponse
DescribeFraudsterRegistrationJobResponse'
(Maybe FraudsterRegistrationJob
-> Int -> DescribeFraudsterRegistrationJobResponse)
-> Either String (Maybe FraudsterRegistrationJob)
-> Either String (Int -> DescribeFraudsterRegistrationJobResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe FraudsterRegistrationJob)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Job")
Either String (Int -> DescribeFraudsterRegistrationJobResponse)
-> Either String Int
-> Either String DescribeFraudsterRegistrationJobResponse
forall (f :: * -> *) a b. Applicative f => 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))
)
instance
Prelude.Hashable
DescribeFraudsterRegistrationJob
instance
Prelude.NFData
DescribeFraudsterRegistrationJob
instance
Core.ToHeaders
DescribeFraudsterRegistrationJob
where
toHeaders :: DescribeFraudsterRegistrationJob -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DescribeFraudsterRegistrationJob -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"VoiceID.DescribeFraudsterRegistrationJob" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DescribeFraudsterRegistrationJob where
toJSON :: DescribeFraudsterRegistrationJob -> Value
toJSON DescribeFraudsterRegistrationJob' {Text
jobId :: Text
domainId :: Text
$sel:jobId:DescribeFraudsterRegistrationJob' :: DescribeFraudsterRegistrationJob -> Text
$sel:domainId:DescribeFraudsterRegistrationJob' :: DescribeFraudsterRegistrationJob -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"JobId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
jobId)
]
)
instance Core.ToPath DescribeFraudsterRegistrationJob where
toPath :: DescribeFraudsterRegistrationJob -> ByteString
toPath = ByteString -> DescribeFraudsterRegistrationJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
DescribeFraudsterRegistrationJob
where
toQuery :: DescribeFraudsterRegistrationJob -> QueryString
toQuery = QueryString -> DescribeFraudsterRegistrationJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeFraudsterRegistrationJobResponse = DescribeFraudsterRegistrationJobResponse'
{
DescribeFraudsterRegistrationJobResponse
-> Maybe FraudsterRegistrationJob
job :: Prelude.Maybe FraudsterRegistrationJob,
DescribeFraudsterRegistrationJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeFraudsterRegistrationJobResponse
-> DescribeFraudsterRegistrationJobResponse -> Bool
(DescribeFraudsterRegistrationJobResponse
-> DescribeFraudsterRegistrationJobResponse -> Bool)
-> (DescribeFraudsterRegistrationJobResponse
-> DescribeFraudsterRegistrationJobResponse -> Bool)
-> Eq DescribeFraudsterRegistrationJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeFraudsterRegistrationJobResponse
-> DescribeFraudsterRegistrationJobResponse -> Bool
$c/= :: DescribeFraudsterRegistrationJobResponse
-> DescribeFraudsterRegistrationJobResponse -> Bool
== :: DescribeFraudsterRegistrationJobResponse
-> DescribeFraudsterRegistrationJobResponse -> Bool
$c== :: DescribeFraudsterRegistrationJobResponse
-> DescribeFraudsterRegistrationJobResponse -> Bool
Prelude.Eq, Int -> DescribeFraudsterRegistrationJobResponse -> ShowS
[DescribeFraudsterRegistrationJobResponse] -> ShowS
DescribeFraudsterRegistrationJobResponse -> String
(Int -> DescribeFraudsterRegistrationJobResponse -> ShowS)
-> (DescribeFraudsterRegistrationJobResponse -> String)
-> ([DescribeFraudsterRegistrationJobResponse] -> ShowS)
-> Show DescribeFraudsterRegistrationJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeFraudsterRegistrationJobResponse] -> ShowS
$cshowList :: [DescribeFraudsterRegistrationJobResponse] -> ShowS
show :: DescribeFraudsterRegistrationJobResponse -> String
$cshow :: DescribeFraudsterRegistrationJobResponse -> String
showsPrec :: Int -> DescribeFraudsterRegistrationJobResponse -> ShowS
$cshowsPrec :: Int -> DescribeFraudsterRegistrationJobResponse -> ShowS
Prelude.Show, (forall x.
DescribeFraudsterRegistrationJobResponse
-> Rep DescribeFraudsterRegistrationJobResponse x)
-> (forall x.
Rep DescribeFraudsterRegistrationJobResponse x
-> DescribeFraudsterRegistrationJobResponse)
-> Generic DescribeFraudsterRegistrationJobResponse
forall x.
Rep DescribeFraudsterRegistrationJobResponse x
-> DescribeFraudsterRegistrationJobResponse
forall x.
DescribeFraudsterRegistrationJobResponse
-> Rep DescribeFraudsterRegistrationJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeFraudsterRegistrationJobResponse x
-> DescribeFraudsterRegistrationJobResponse
$cfrom :: forall x.
DescribeFraudsterRegistrationJobResponse
-> Rep DescribeFraudsterRegistrationJobResponse x
Prelude.Generic)
newDescribeFraudsterRegistrationJobResponse ::
Prelude.Int ->
DescribeFraudsterRegistrationJobResponse
newDescribeFraudsterRegistrationJobResponse :: Int -> DescribeFraudsterRegistrationJobResponse
newDescribeFraudsterRegistrationJobResponse
Int
pHttpStatus_ =
DescribeFraudsterRegistrationJobResponse' :: Maybe FraudsterRegistrationJob
-> Int -> DescribeFraudsterRegistrationJobResponse
DescribeFraudsterRegistrationJobResponse'
{ $sel:job:DescribeFraudsterRegistrationJobResponse' :: Maybe FraudsterRegistrationJob
job =
Maybe FraudsterRegistrationJob
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeFraudsterRegistrationJobResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeFraudsterRegistrationJobResponse_job :: Lens.Lens' DescribeFraudsterRegistrationJobResponse (Prelude.Maybe FraudsterRegistrationJob)
describeFraudsterRegistrationJobResponse_job :: (Maybe FraudsterRegistrationJob
-> f (Maybe FraudsterRegistrationJob))
-> DescribeFraudsterRegistrationJobResponse
-> f DescribeFraudsterRegistrationJobResponse
describeFraudsterRegistrationJobResponse_job = (DescribeFraudsterRegistrationJobResponse
-> Maybe FraudsterRegistrationJob)
-> (DescribeFraudsterRegistrationJobResponse
-> Maybe FraudsterRegistrationJob
-> DescribeFraudsterRegistrationJobResponse)
-> Lens
DescribeFraudsterRegistrationJobResponse
DescribeFraudsterRegistrationJobResponse
(Maybe FraudsterRegistrationJob)
(Maybe FraudsterRegistrationJob)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFraudsterRegistrationJobResponse' {Maybe FraudsterRegistrationJob
job :: Maybe FraudsterRegistrationJob
$sel:job:DescribeFraudsterRegistrationJobResponse' :: DescribeFraudsterRegistrationJobResponse
-> Maybe FraudsterRegistrationJob
job} -> Maybe FraudsterRegistrationJob
job) (\s :: DescribeFraudsterRegistrationJobResponse
s@DescribeFraudsterRegistrationJobResponse' {} Maybe FraudsterRegistrationJob
a -> DescribeFraudsterRegistrationJobResponse
s {$sel:job:DescribeFraudsterRegistrationJobResponse' :: Maybe FraudsterRegistrationJob
job = Maybe FraudsterRegistrationJob
a} :: DescribeFraudsterRegistrationJobResponse)
describeFraudsterRegistrationJobResponse_httpStatus :: Lens.Lens' DescribeFraudsterRegistrationJobResponse Prelude.Int
describeFraudsterRegistrationJobResponse_httpStatus :: (Int -> f Int)
-> DescribeFraudsterRegistrationJobResponse
-> f DescribeFraudsterRegistrationJobResponse
describeFraudsterRegistrationJobResponse_httpStatus = (DescribeFraudsterRegistrationJobResponse -> Int)
-> (DescribeFraudsterRegistrationJobResponse
-> Int -> DescribeFraudsterRegistrationJobResponse)
-> Lens
DescribeFraudsterRegistrationJobResponse
DescribeFraudsterRegistrationJobResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeFraudsterRegistrationJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeFraudsterRegistrationJobResponse' :: DescribeFraudsterRegistrationJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeFraudsterRegistrationJobResponse
s@DescribeFraudsterRegistrationJobResponse' {} Int
a -> DescribeFraudsterRegistrationJobResponse
s {$sel:httpStatus:DescribeFraudsterRegistrationJobResponse' :: Int
httpStatus = Int
a} :: DescribeFraudsterRegistrationJobResponse)
instance
Prelude.NFData
DescribeFraudsterRegistrationJobResponse