{-# 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 qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.FraudDetector.Types
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
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]
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
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. 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' {$sel:jobId:DeleteBatchImportJob' :: Text
jobId = Text
pJobId_}
deleteBatchImportJob_jobId :: Lens.Lens' DeleteBatchImportJob Prelude.Text
deleteBatchImportJob_jobId :: Lens' DeleteBatchImportJob Text
deleteBatchImportJob_jobId = 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 :: (Service -> Service)
-> DeleteBatchImportJob -> Request DeleteBatchImportJob
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteBatchImportJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteBatchImportJob)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteBatchImportJobResponse
DeleteBatchImportJobResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeleteBatchImportJob where
hashWithSalt :: Int -> DeleteBatchImportJob -> Int
hashWithSalt Int
_salt DeleteBatchImportJob' {Text
jobId :: Text
$sel:jobId:DeleteBatchImportJob' :: DeleteBatchImportJob -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobId
instance Prelude.NFData DeleteBatchImportJob where
rnf :: DeleteBatchImportJob -> ()
rnf DeleteBatchImportJob' {Text
jobId :: Text
$sel:jobId:DeleteBatchImportJob' :: DeleteBatchImportJob -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
jobId
instance Data.ToHeaders DeleteBatchImportJob where
toHeaders :: DeleteBatchImportJob -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AWSHawksNestServiceFacade.DeleteBatchImportJob" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteBatchImportJob where
toJSON :: DeleteBatchImportJob -> Value
toJSON DeleteBatchImportJob' {Text
jobId :: Text
$sel:jobId:DeleteBatchImportJob' :: DeleteBatchImportJob -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"jobId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
jobId)]
)
instance Data.ToPath DeleteBatchImportJob where
toPath :: DeleteBatchImportJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteBatchImportJob where
toQuery :: DeleteBatchImportJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteBatchImportJobResponse = DeleteBatchImportJobResponse'
{
DeleteBatchImportJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteBatchImportJobResponse
-> DeleteBatchImportJobResponse -> Bool
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]
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
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.
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'
{ $sel:httpStatus:DeleteBatchImportJobResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteBatchImportJobResponse_httpStatus :: Lens.Lens' DeleteBatchImportJobResponse Prelude.Int
deleteBatchImportJobResponse_httpStatus :: Lens' DeleteBatchImportJobResponse Int
deleteBatchImportJobResponse_httpStatus = 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 where
rnf :: DeleteBatchImportJobResponse -> ()
rnf DeleteBatchImportJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteBatchImportJobResponse' :: DeleteBatchImportJobResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus