{-# 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.Batch.DeleteJobQueue
(
DeleteJobQueue (..),
newDeleteJobQueue,
deleteJobQueue_jobQueue,
DeleteJobQueueResponse (..),
newDeleteJobQueueResponse,
deleteJobQueueResponse_httpStatus,
)
where
import Amazonka.Batch.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteJobQueue = DeleteJobQueue'
{
DeleteJobQueue -> Text
jobQueue :: Prelude.Text
}
deriving (DeleteJobQueue -> DeleteJobQueue -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteJobQueue -> DeleteJobQueue -> Bool
$c/= :: DeleteJobQueue -> DeleteJobQueue -> Bool
== :: DeleteJobQueue -> DeleteJobQueue -> Bool
$c== :: DeleteJobQueue -> DeleteJobQueue -> Bool
Prelude.Eq, ReadPrec [DeleteJobQueue]
ReadPrec DeleteJobQueue
Int -> ReadS DeleteJobQueue
ReadS [DeleteJobQueue]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteJobQueue]
$creadListPrec :: ReadPrec [DeleteJobQueue]
readPrec :: ReadPrec DeleteJobQueue
$creadPrec :: ReadPrec DeleteJobQueue
readList :: ReadS [DeleteJobQueue]
$creadList :: ReadS [DeleteJobQueue]
readsPrec :: Int -> ReadS DeleteJobQueue
$creadsPrec :: Int -> ReadS DeleteJobQueue
Prelude.Read, Int -> DeleteJobQueue -> ShowS
[DeleteJobQueue] -> ShowS
DeleteJobQueue -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteJobQueue] -> ShowS
$cshowList :: [DeleteJobQueue] -> ShowS
show :: DeleteJobQueue -> String
$cshow :: DeleteJobQueue -> String
showsPrec :: Int -> DeleteJobQueue -> ShowS
$cshowsPrec :: Int -> DeleteJobQueue -> ShowS
Prelude.Show, forall x. Rep DeleteJobQueue x -> DeleteJobQueue
forall x. DeleteJobQueue -> Rep DeleteJobQueue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteJobQueue x -> DeleteJobQueue
$cfrom :: forall x. DeleteJobQueue -> Rep DeleteJobQueue x
Prelude.Generic)
newDeleteJobQueue ::
Prelude.Text ->
DeleteJobQueue
newDeleteJobQueue :: Text -> DeleteJobQueue
newDeleteJobQueue Text
pJobQueue_ =
DeleteJobQueue' {$sel:jobQueue:DeleteJobQueue' :: Text
jobQueue = Text
pJobQueue_}
deleteJobQueue_jobQueue :: Lens.Lens' DeleteJobQueue Prelude.Text
deleteJobQueue_jobQueue :: Lens' DeleteJobQueue Text
deleteJobQueue_jobQueue = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteJobQueue' {Text
jobQueue :: Text
$sel:jobQueue:DeleteJobQueue' :: DeleteJobQueue -> Text
jobQueue} -> Text
jobQueue) (\s :: DeleteJobQueue
s@DeleteJobQueue' {} Text
a -> DeleteJobQueue
s {$sel:jobQueue:DeleteJobQueue' :: Text
jobQueue = Text
a} :: DeleteJobQueue)
instance Core.AWSRequest DeleteJobQueue where
type
AWSResponse DeleteJobQueue =
DeleteJobQueueResponse
request :: (Service -> Service) -> DeleteJobQueue -> Request DeleteJobQueue
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 DeleteJobQueue
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteJobQueue)))
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 -> DeleteJobQueueResponse
DeleteJobQueueResponse'
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 DeleteJobQueue where
hashWithSalt :: Int -> DeleteJobQueue -> Int
hashWithSalt Int
_salt DeleteJobQueue' {Text
jobQueue :: Text
$sel:jobQueue:DeleteJobQueue' :: DeleteJobQueue -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
jobQueue
instance Prelude.NFData DeleteJobQueue where
rnf :: DeleteJobQueue -> ()
rnf DeleteJobQueue' {Text
jobQueue :: Text
$sel:jobQueue:DeleteJobQueue' :: DeleteJobQueue -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
jobQueue
instance Data.ToHeaders DeleteJobQueue where
toHeaders :: DeleteJobQueue -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteJobQueue where
toJSON :: DeleteJobQueue -> Value
toJSON DeleteJobQueue' {Text
jobQueue :: Text
$sel:jobQueue:DeleteJobQueue' :: DeleteJobQueue -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"jobQueue" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
jobQueue)]
)
instance Data.ToPath DeleteJobQueue where
toPath :: DeleteJobQueue -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/v1/deletejobqueue"
instance Data.ToQuery DeleteJobQueue where
toQuery :: DeleteJobQueue -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteJobQueueResponse = DeleteJobQueueResponse'
{
DeleteJobQueueResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteJobQueueResponse -> DeleteJobQueueResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteJobQueueResponse -> DeleteJobQueueResponse -> Bool
$c/= :: DeleteJobQueueResponse -> DeleteJobQueueResponse -> Bool
== :: DeleteJobQueueResponse -> DeleteJobQueueResponse -> Bool
$c== :: DeleteJobQueueResponse -> DeleteJobQueueResponse -> Bool
Prelude.Eq, ReadPrec [DeleteJobQueueResponse]
ReadPrec DeleteJobQueueResponse
Int -> ReadS DeleteJobQueueResponse
ReadS [DeleteJobQueueResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteJobQueueResponse]
$creadListPrec :: ReadPrec [DeleteJobQueueResponse]
readPrec :: ReadPrec DeleteJobQueueResponse
$creadPrec :: ReadPrec DeleteJobQueueResponse
readList :: ReadS [DeleteJobQueueResponse]
$creadList :: ReadS [DeleteJobQueueResponse]
readsPrec :: Int -> ReadS DeleteJobQueueResponse
$creadsPrec :: Int -> ReadS DeleteJobQueueResponse
Prelude.Read, Int -> DeleteJobQueueResponse -> ShowS
[DeleteJobQueueResponse] -> ShowS
DeleteJobQueueResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteJobQueueResponse] -> ShowS
$cshowList :: [DeleteJobQueueResponse] -> ShowS
show :: DeleteJobQueueResponse -> String
$cshow :: DeleteJobQueueResponse -> String
showsPrec :: Int -> DeleteJobQueueResponse -> ShowS
$cshowsPrec :: Int -> DeleteJobQueueResponse -> ShowS
Prelude.Show, forall x. Rep DeleteJobQueueResponse x -> DeleteJobQueueResponse
forall x. DeleteJobQueueResponse -> Rep DeleteJobQueueResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteJobQueueResponse x -> DeleteJobQueueResponse
$cfrom :: forall x. DeleteJobQueueResponse -> Rep DeleteJobQueueResponse x
Prelude.Generic)
newDeleteJobQueueResponse ::
Prelude.Int ->
DeleteJobQueueResponse
newDeleteJobQueueResponse :: Int -> DeleteJobQueueResponse
newDeleteJobQueueResponse Int
pHttpStatus_ =
DeleteJobQueueResponse' {$sel:httpStatus:DeleteJobQueueResponse' :: Int
httpStatus = Int
pHttpStatus_}
deleteJobQueueResponse_httpStatus :: Lens.Lens' DeleteJobQueueResponse Prelude.Int
deleteJobQueueResponse_httpStatus :: Lens' DeleteJobQueueResponse Int
deleteJobQueueResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteJobQueueResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteJobQueueResponse' :: DeleteJobQueueResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteJobQueueResponse
s@DeleteJobQueueResponse' {} Int
a -> DeleteJobQueueResponse
s {$sel:httpStatus:DeleteJobQueueResponse' :: Int
httpStatus = Int
a} :: DeleteJobQueueResponse)
instance Prelude.NFData DeleteJobQueueResponse where
rnf :: DeleteJobQueueResponse -> ()
rnf DeleteJobQueueResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteJobQueueResponse' :: DeleteJobQueueResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus