{-# 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.FraudDetector.DeleteBatchImportJob
(
DeleteBatchImportJob (..),
newDeleteBatchImportJob,
deleteBatchImportJob_jobId,
DeleteBatchImportJobResponse (..),
newDeleteBatchImportJobResponse,
deleteBatchImportJobResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.FraudDetector.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteBatchImportJob = DeleteBatchImportJob'
{
DeleteBatchImportJob -> Text
jobId :: Prelude.Text
}
deriving (DeleteBatchImportJob -> DeleteBatchImportJob -> Bool
(DeleteBatchImportJob -> DeleteBatchImportJob -> Bool)
-> (DeleteBatchImportJob -> DeleteBatchImportJob -> Bool)
-> Eq DeleteBatchImportJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBatchImportJob -> DeleteBatchImportJob -> Bool
$c/= :: DeleteBatchImportJob -> DeleteBatchImportJob -> Bool
== :: DeleteBatchImportJob -> DeleteBatchImportJob -> Bool
$c== :: DeleteBatchImportJob -> DeleteBatchImportJob -> Bool
Prelude.Eq, ReadPrec [DeleteBatchImportJob]
ReadPrec DeleteBatchImportJob
Int -> ReadS DeleteBatchImportJob
ReadS [DeleteBatchImportJob]
(Int -> ReadS DeleteBatchImportJob)
-> ReadS [DeleteBatchImportJob]
-> ReadPrec DeleteBatchImportJob
-> ReadPrec [DeleteBatchImportJob]
-> Read DeleteBatchImportJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBatchImportJob]
$creadListPrec :: ReadPrec [DeleteBatchImportJob]
readPrec :: ReadPrec DeleteBatchImportJob
$creadPrec :: ReadPrec DeleteBatchImportJob
readList :: ReadS [DeleteBatchImportJob]
$creadList :: ReadS [DeleteBatchImportJob]
readsPrec :: Int -> ReadS DeleteBatchImportJob
$creadsPrec :: Int -> ReadS DeleteBatchImportJob
Prelude.Read, Int -> DeleteBatchImportJob -> ShowS
[DeleteBatchImportJob] -> ShowS
DeleteBatchImportJob -> String
(Int -> DeleteBatchImportJob -> ShowS)
-> (DeleteBatchImportJob -> String)
-> ([DeleteBatchImportJob] -> ShowS)
-> Show DeleteBatchImportJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBatchImportJob] -> ShowS
$cshowList :: [DeleteBatchImportJob] -> ShowS
show :: DeleteBatchImportJob -> String
$cshow :: DeleteBatchImportJob -> String
showsPrec :: Int -> DeleteBatchImportJob -> ShowS
$cshowsPrec :: Int -> DeleteBatchImportJob -> ShowS
Prelude.Show, (forall x. DeleteBatchImportJob -> Rep DeleteBatchImportJob x)
-> (forall x. Rep DeleteBatchImportJob x -> DeleteBatchImportJob)
-> Generic DeleteBatchImportJob
forall x. Rep DeleteBatchImportJob x -> DeleteBatchImportJob
forall x. DeleteBatchImportJob -> Rep DeleteBatchImportJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteBatchImportJob x -> DeleteBatchImportJob
$cfrom :: forall x. DeleteBatchImportJob -> Rep DeleteBatchImportJob x
Prelude.Generic)
newDeleteBatchImportJob ::
Prelude.Text ->
DeleteBatchImportJob
newDeleteBatchImportJob :: Text -> DeleteBatchImportJob
newDeleteBatchImportJob Text
pJobId_ =
DeleteBatchImportJob' :: Text -> DeleteBatchImportJob
DeleteBatchImportJob' {$sel:jobId:DeleteBatchImportJob' :: Text
jobId = Text
pJobId_}
deleteBatchImportJob_jobId :: Lens.Lens' DeleteBatchImportJob Prelude.Text
deleteBatchImportJob_jobId :: (Text -> f Text) -> DeleteBatchImportJob -> f DeleteBatchImportJob
deleteBatchImportJob_jobId = (DeleteBatchImportJob -> Text)
-> (DeleteBatchImportJob -> Text -> DeleteBatchImportJob)
-> Lens DeleteBatchImportJob DeleteBatchImportJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBatchImportJob' {Text
jobId :: Text
$sel:jobId:DeleteBatchImportJob' :: DeleteBatchImportJob -> Text
jobId} -> Text
jobId) (\s :: DeleteBatchImportJob
s@DeleteBatchImportJob' {} Text
a -> DeleteBatchImportJob
s {$sel:jobId:DeleteBatchImportJob' :: Text
jobId = Text
a} :: DeleteBatchImportJob)
instance Core.AWSRequest DeleteBatchImportJob where
type
AWSResponse DeleteBatchImportJob =
DeleteBatchImportJobResponse
request :: DeleteBatchImportJob -> Request DeleteBatchImportJob
request = Service -> DeleteBatchImportJob -> Request DeleteBatchImportJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteBatchImportJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteBatchImportJob)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteBatchImportJob))
-> Logger
-> Service
-> Proxy DeleteBatchImportJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteBatchImportJob)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteBatchImportJobResponse
DeleteBatchImportJobResponse'
(Int -> DeleteBatchImportJobResponse)
-> Either String Int -> Either String DeleteBatchImportJobResponse
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))
)
instance Prelude.Hashable DeleteBatchImportJob
instance Prelude.NFData DeleteBatchImportJob
instance Core.ToHeaders DeleteBatchImportJob where
toHeaders :: DeleteBatchImportJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteBatchImportJob -> 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
"AWSHawksNestServiceFacade.DeleteBatchImportJob" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteBatchImportJob where
toJSON :: DeleteBatchImportJob -> Value
toJSON DeleteBatchImportJob' {Text
jobId :: Text
$sel:jobId:DeleteBatchImportJob' :: DeleteBatchImportJob -> 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
"jobId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
jobId)]
)
instance Core.ToPath DeleteBatchImportJob where
toPath :: DeleteBatchImportJob -> ByteString
toPath = ByteString -> DeleteBatchImportJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteBatchImportJob where
toQuery :: DeleteBatchImportJob -> QueryString
toQuery = QueryString -> DeleteBatchImportJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteBatchImportJobResponse = DeleteBatchImportJobResponse'
{
DeleteBatchImportJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteBatchImportJobResponse
-> DeleteBatchImportJobResponse -> Bool
(DeleteBatchImportJobResponse
-> DeleteBatchImportJobResponse -> Bool)
-> (DeleteBatchImportJobResponse
-> DeleteBatchImportJobResponse -> Bool)
-> Eq DeleteBatchImportJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteBatchImportJobResponse
-> DeleteBatchImportJobResponse -> Bool
$c/= :: DeleteBatchImportJobResponse
-> DeleteBatchImportJobResponse -> Bool
== :: DeleteBatchImportJobResponse
-> DeleteBatchImportJobResponse -> Bool
$c== :: DeleteBatchImportJobResponse
-> DeleteBatchImportJobResponse -> Bool
Prelude.Eq, ReadPrec [DeleteBatchImportJobResponse]
ReadPrec DeleteBatchImportJobResponse
Int -> ReadS DeleteBatchImportJobResponse
ReadS [DeleteBatchImportJobResponse]
(Int -> ReadS DeleteBatchImportJobResponse)
-> ReadS [DeleteBatchImportJobResponse]
-> ReadPrec DeleteBatchImportJobResponse
-> ReadPrec [DeleteBatchImportJobResponse]
-> Read DeleteBatchImportJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteBatchImportJobResponse]
$creadListPrec :: ReadPrec [DeleteBatchImportJobResponse]
readPrec :: ReadPrec DeleteBatchImportJobResponse
$creadPrec :: ReadPrec DeleteBatchImportJobResponse
readList :: ReadS [DeleteBatchImportJobResponse]
$creadList :: ReadS [DeleteBatchImportJobResponse]
readsPrec :: Int -> ReadS DeleteBatchImportJobResponse
$creadsPrec :: Int -> ReadS DeleteBatchImportJobResponse
Prelude.Read, Int -> DeleteBatchImportJobResponse -> ShowS
[DeleteBatchImportJobResponse] -> ShowS
DeleteBatchImportJobResponse -> String
(Int -> DeleteBatchImportJobResponse -> ShowS)
-> (DeleteBatchImportJobResponse -> String)
-> ([DeleteBatchImportJobResponse] -> ShowS)
-> Show DeleteBatchImportJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteBatchImportJobResponse] -> ShowS
$cshowList :: [DeleteBatchImportJobResponse] -> ShowS
show :: DeleteBatchImportJobResponse -> String
$cshow :: DeleteBatchImportJobResponse -> String
showsPrec :: Int -> DeleteBatchImportJobResponse -> ShowS
$cshowsPrec :: Int -> DeleteBatchImportJobResponse -> ShowS
Prelude.Show, (forall x.
DeleteBatchImportJobResponse -> Rep DeleteBatchImportJobResponse x)
-> (forall x.
Rep DeleteBatchImportJobResponse x -> DeleteBatchImportJobResponse)
-> Generic DeleteBatchImportJobResponse
forall x.
Rep DeleteBatchImportJobResponse x -> DeleteBatchImportJobResponse
forall x.
DeleteBatchImportJobResponse -> Rep DeleteBatchImportJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteBatchImportJobResponse x -> DeleteBatchImportJobResponse
$cfrom :: forall x.
DeleteBatchImportJobResponse -> Rep DeleteBatchImportJobResponse x
Prelude.Generic)
newDeleteBatchImportJobResponse ::
Prelude.Int ->
DeleteBatchImportJobResponse
newDeleteBatchImportJobResponse :: Int -> DeleteBatchImportJobResponse
newDeleteBatchImportJobResponse Int
pHttpStatus_ =
DeleteBatchImportJobResponse' :: Int -> DeleteBatchImportJobResponse
DeleteBatchImportJobResponse'
{ $sel:httpStatus:DeleteBatchImportJobResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteBatchImportJobResponse_httpStatus :: Lens.Lens' DeleteBatchImportJobResponse Prelude.Int
deleteBatchImportJobResponse_httpStatus :: (Int -> f Int)
-> DeleteBatchImportJobResponse -> f DeleteBatchImportJobResponse
deleteBatchImportJobResponse_httpStatus = (DeleteBatchImportJobResponse -> Int)
-> (DeleteBatchImportJobResponse
-> Int -> DeleteBatchImportJobResponse)
-> Lens
DeleteBatchImportJobResponse DeleteBatchImportJobResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteBatchImportJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteBatchImportJobResponse' :: DeleteBatchImportJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteBatchImportJobResponse
s@DeleteBatchImportJobResponse' {} Int
a -> DeleteBatchImportJobResponse
s {$sel:httpStatus:DeleteBatchImportJobResponse' :: Int
httpStatus = Int
a} :: DeleteBatchImportJobResponse)
instance Prelude.NFData DeleteBatchImportJobResponse