{-# 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.DeleteFraudster
(
DeleteFraudster (..),
newDeleteFraudster,
deleteFraudster_domainId,
deleteFraudster_fraudsterId,
DeleteFraudsterResponse (..),
newDeleteFraudsterResponse,
)
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 DeleteFraudster = DeleteFraudster'
{
DeleteFraudster -> Text
domainId :: Prelude.Text,
DeleteFraudster -> Sensitive Text
fraudsterId :: Core.Sensitive Prelude.Text
}
deriving (DeleteFraudster -> DeleteFraudster -> Bool
(DeleteFraudster -> DeleteFraudster -> Bool)
-> (DeleteFraudster -> DeleteFraudster -> Bool)
-> Eq DeleteFraudster
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFraudster -> DeleteFraudster -> Bool
$c/= :: DeleteFraudster -> DeleteFraudster -> Bool
== :: DeleteFraudster -> DeleteFraudster -> Bool
$c== :: DeleteFraudster -> DeleteFraudster -> Bool
Prelude.Eq, Int -> DeleteFraudster -> ShowS
[DeleteFraudster] -> ShowS
DeleteFraudster -> String
(Int -> DeleteFraudster -> ShowS)
-> (DeleteFraudster -> String)
-> ([DeleteFraudster] -> ShowS)
-> Show DeleteFraudster
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFraudster] -> ShowS
$cshowList :: [DeleteFraudster] -> ShowS
show :: DeleteFraudster -> String
$cshow :: DeleteFraudster -> String
showsPrec :: Int -> DeleteFraudster -> ShowS
$cshowsPrec :: Int -> DeleteFraudster -> ShowS
Prelude.Show, (forall x. DeleteFraudster -> Rep DeleteFraudster x)
-> (forall x. Rep DeleteFraudster x -> DeleteFraudster)
-> Generic DeleteFraudster
forall x. Rep DeleteFraudster x -> DeleteFraudster
forall x. DeleteFraudster -> Rep DeleteFraudster x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteFraudster x -> DeleteFraudster
$cfrom :: forall x. DeleteFraudster -> Rep DeleteFraudster x
Prelude.Generic)
newDeleteFraudster ::
Prelude.Text ->
Prelude.Text ->
DeleteFraudster
newDeleteFraudster :: Text -> Text -> DeleteFraudster
newDeleteFraudster Text
pDomainId_ Text
pFraudsterId_ =
DeleteFraudster' :: Text -> Sensitive Text -> DeleteFraudster
DeleteFraudster'
{ $sel:domainId:DeleteFraudster' :: Text
domainId = Text
pDomainId_,
$sel:fraudsterId:DeleteFraudster' :: Sensitive Text
fraudsterId = Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive (Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pFraudsterId_
}
deleteFraudster_domainId :: Lens.Lens' DeleteFraudster Prelude.Text
deleteFraudster_domainId :: (Text -> f Text) -> DeleteFraudster -> f DeleteFraudster
deleteFraudster_domainId = (DeleteFraudster -> Text)
-> (DeleteFraudster -> Text -> DeleteFraudster)
-> Lens DeleteFraudster DeleteFraudster Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFraudster' {Text
domainId :: Text
$sel:domainId:DeleteFraudster' :: DeleteFraudster -> Text
domainId} -> Text
domainId) (\s :: DeleteFraudster
s@DeleteFraudster' {} Text
a -> DeleteFraudster
s {$sel:domainId:DeleteFraudster' :: Text
domainId = Text
a} :: DeleteFraudster)
deleteFraudster_fraudsterId :: Lens.Lens' DeleteFraudster Prelude.Text
deleteFraudster_fraudsterId :: (Text -> f Text) -> DeleteFraudster -> f DeleteFraudster
deleteFraudster_fraudsterId = (DeleteFraudster -> Sensitive Text)
-> (DeleteFraudster -> Sensitive Text -> DeleteFraudster)
-> Lens
DeleteFraudster DeleteFraudster (Sensitive Text) (Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteFraudster' {Sensitive Text
fraudsterId :: Sensitive Text
$sel:fraudsterId:DeleteFraudster' :: DeleteFraudster -> Sensitive Text
fraudsterId} -> Sensitive Text
fraudsterId) (\s :: DeleteFraudster
s@DeleteFraudster' {} Sensitive Text
a -> DeleteFraudster
s {$sel:fraudsterId:DeleteFraudster' :: Sensitive Text
fraudsterId = Sensitive Text
a} :: DeleteFraudster) ((Sensitive Text -> f (Sensitive Text))
-> DeleteFraudster -> f DeleteFraudster)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> DeleteFraudster
-> f DeleteFraudster
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
instance Core.AWSRequest DeleteFraudster where
type
AWSResponse DeleteFraudster =
DeleteFraudsterResponse
request :: DeleteFraudster -> Request DeleteFraudster
request = Service -> DeleteFraudster -> Request DeleteFraudster
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteFraudster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteFraudster)))
response =
AWSResponse DeleteFraudster
-> Logger
-> Service
-> Proxy DeleteFraudster
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteFraudster)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteFraudster
DeleteFraudsterResponse
DeleteFraudsterResponse'
instance Prelude.Hashable DeleteFraudster
instance Prelude.NFData DeleteFraudster
instance Core.ToHeaders DeleteFraudster where
toHeaders :: DeleteFraudster -> [Header]
toHeaders =
[Header] -> DeleteFraudster -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# (ByteString
"VoiceID.DeleteFraudster" :: Prelude.ByteString),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteFraudster where
toJSON :: DeleteFraudster -> Value
toJSON DeleteFraudster' {Text
Sensitive Text
fraudsterId :: Sensitive Text
domainId :: Text
$sel:fraudsterId:DeleteFraudster' :: DeleteFraudster -> Sensitive Text
$sel:domainId:DeleteFraudster' :: DeleteFraudster -> 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
"FraudsterId" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Sensitive Text
fraudsterId)
]
)
instance Core.ToPath DeleteFraudster where
toPath :: DeleteFraudster -> ByteString
toPath = ByteString -> DeleteFraudster -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteFraudster where
toQuery :: DeleteFraudster -> QueryString
toQuery = QueryString -> DeleteFraudster -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteFraudsterResponse = DeleteFraudsterResponse'
{
}
deriving (DeleteFraudsterResponse -> DeleteFraudsterResponse -> Bool
(DeleteFraudsterResponse -> DeleteFraudsterResponse -> Bool)
-> (DeleteFraudsterResponse -> DeleteFraudsterResponse -> Bool)
-> Eq DeleteFraudsterResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteFraudsterResponse -> DeleteFraudsterResponse -> Bool
$c/= :: DeleteFraudsterResponse -> DeleteFraudsterResponse -> Bool
== :: DeleteFraudsterResponse -> DeleteFraudsterResponse -> Bool
$c== :: DeleteFraudsterResponse -> DeleteFraudsterResponse -> Bool
Prelude.Eq, ReadPrec [DeleteFraudsterResponse]
ReadPrec DeleteFraudsterResponse
Int -> ReadS DeleteFraudsterResponse
ReadS [DeleteFraudsterResponse]
(Int -> ReadS DeleteFraudsterResponse)
-> ReadS [DeleteFraudsterResponse]
-> ReadPrec DeleteFraudsterResponse
-> ReadPrec [DeleteFraudsterResponse]
-> Read DeleteFraudsterResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteFraudsterResponse]
$creadListPrec :: ReadPrec [DeleteFraudsterResponse]
readPrec :: ReadPrec DeleteFraudsterResponse
$creadPrec :: ReadPrec DeleteFraudsterResponse
readList :: ReadS [DeleteFraudsterResponse]
$creadList :: ReadS [DeleteFraudsterResponse]
readsPrec :: Int -> ReadS DeleteFraudsterResponse
$creadsPrec :: Int -> ReadS DeleteFraudsterResponse
Prelude.Read, Int -> DeleteFraudsterResponse -> ShowS
[DeleteFraudsterResponse] -> ShowS
DeleteFraudsterResponse -> String
(Int -> DeleteFraudsterResponse -> ShowS)
-> (DeleteFraudsterResponse -> String)
-> ([DeleteFraudsterResponse] -> ShowS)
-> Show DeleteFraudsterResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteFraudsterResponse] -> ShowS
$cshowList :: [DeleteFraudsterResponse] -> ShowS
show :: DeleteFraudsterResponse -> String
$cshow :: DeleteFraudsterResponse -> String
showsPrec :: Int -> DeleteFraudsterResponse -> ShowS
$cshowsPrec :: Int -> DeleteFraudsterResponse -> ShowS
Prelude.Show, (forall x.
DeleteFraudsterResponse -> Rep DeleteFraudsterResponse x)
-> (forall x.
Rep DeleteFraudsterResponse x -> DeleteFraudsterResponse)
-> Generic DeleteFraudsterResponse
forall x. Rep DeleteFraudsterResponse x -> DeleteFraudsterResponse
forall x. DeleteFraudsterResponse -> Rep DeleteFraudsterResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteFraudsterResponse x -> DeleteFraudsterResponse
$cfrom :: forall x. DeleteFraudsterResponse -> Rep DeleteFraudsterResponse x
Prelude.Generic)
newDeleteFraudsterResponse ::
DeleteFraudsterResponse
newDeleteFraudsterResponse :: DeleteFraudsterResponse
newDeleteFraudsterResponse = DeleteFraudsterResponse
DeleteFraudsterResponse'
instance Prelude.NFData DeleteFraudsterResponse