{-# 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.MediaConvert.DeleteQueue
(
DeleteQueue (..),
newDeleteQueue,
deleteQueue_name,
DeleteQueueResponse (..),
newDeleteQueueResponse,
deleteQueueResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConvert.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteQueue = DeleteQueue'
{
DeleteQueue -> Text
name :: Prelude.Text
}
deriving (DeleteQueue -> DeleteQueue -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteQueue -> DeleteQueue -> Bool
$c/= :: DeleteQueue -> DeleteQueue -> Bool
== :: DeleteQueue -> DeleteQueue -> Bool
$c== :: DeleteQueue -> DeleteQueue -> Bool
Prelude.Eq, ReadPrec [DeleteQueue]
ReadPrec DeleteQueue
Int -> ReadS DeleteQueue
ReadS [DeleteQueue]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteQueue]
$creadListPrec :: ReadPrec [DeleteQueue]
readPrec :: ReadPrec DeleteQueue
$creadPrec :: ReadPrec DeleteQueue
readList :: ReadS [DeleteQueue]
$creadList :: ReadS [DeleteQueue]
readsPrec :: Int -> ReadS DeleteQueue
$creadsPrec :: Int -> ReadS DeleteQueue
Prelude.Read, Int -> DeleteQueue -> ShowS
[DeleteQueue] -> ShowS
DeleteQueue -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteQueue] -> ShowS
$cshowList :: [DeleteQueue] -> ShowS
show :: DeleteQueue -> String
$cshow :: DeleteQueue -> String
showsPrec :: Int -> DeleteQueue -> ShowS
$cshowsPrec :: Int -> DeleteQueue -> ShowS
Prelude.Show, forall x. Rep DeleteQueue x -> DeleteQueue
forall x. DeleteQueue -> Rep DeleteQueue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteQueue x -> DeleteQueue
$cfrom :: forall x. DeleteQueue -> Rep DeleteQueue x
Prelude.Generic)
newDeleteQueue ::
Prelude.Text ->
DeleteQueue
newDeleteQueue :: Text -> DeleteQueue
newDeleteQueue Text
pName_ = DeleteQueue' {$sel:name:DeleteQueue' :: Text
name = Text
pName_}
deleteQueue_name :: Lens.Lens' DeleteQueue Prelude.Text
deleteQueue_name :: Lens' DeleteQueue Text
deleteQueue_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteQueue' {Text
name :: Text
$sel:name:DeleteQueue' :: DeleteQueue -> Text
name} -> Text
name) (\s :: DeleteQueue
s@DeleteQueue' {} Text
a -> DeleteQueue
s {$sel:name:DeleteQueue' :: Text
name = Text
a} :: DeleteQueue)
instance Core.AWSRequest DeleteQueue where
type AWSResponse DeleteQueue = DeleteQueueResponse
request :: (Service -> Service) -> DeleteQueue -> Request DeleteQueue
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteQueue
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteQueue)))
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 -> DeleteQueueResponse
DeleteQueueResponse'
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 DeleteQueue where
hashWithSalt :: Int -> DeleteQueue -> Int
hashWithSalt Int
_salt DeleteQueue' {Text
name :: Text
$sel:name:DeleteQueue' :: DeleteQueue -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
instance Prelude.NFData DeleteQueue where
rnf :: DeleteQueue -> ()
rnf DeleteQueue' {Text
name :: Text
$sel:name:DeleteQueue' :: DeleteQueue -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
name
instance Data.ToHeaders DeleteQueue where
toHeaders :: DeleteQueue -> 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.ToPath DeleteQueue where
toPath :: DeleteQueue -> ByteString
toPath DeleteQueue' {Text
name :: Text
$sel:name:DeleteQueue' :: DeleteQueue -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/2017-08-29/queues/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
name]
instance Data.ToQuery DeleteQueue where
toQuery :: DeleteQueue -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteQueueResponse = DeleteQueueResponse'
{
DeleteQueueResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteQueueResponse -> DeleteQueueResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteQueueResponse -> DeleteQueueResponse -> Bool
$c/= :: DeleteQueueResponse -> DeleteQueueResponse -> Bool
== :: DeleteQueueResponse -> DeleteQueueResponse -> Bool
$c== :: DeleteQueueResponse -> DeleteQueueResponse -> Bool
Prelude.Eq, ReadPrec [DeleteQueueResponse]
ReadPrec DeleteQueueResponse
Int -> ReadS DeleteQueueResponse
ReadS [DeleteQueueResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteQueueResponse]
$creadListPrec :: ReadPrec [DeleteQueueResponse]
readPrec :: ReadPrec DeleteQueueResponse
$creadPrec :: ReadPrec DeleteQueueResponse
readList :: ReadS [DeleteQueueResponse]
$creadList :: ReadS [DeleteQueueResponse]
readsPrec :: Int -> ReadS DeleteQueueResponse
$creadsPrec :: Int -> ReadS DeleteQueueResponse
Prelude.Read, Int -> DeleteQueueResponse -> ShowS
[DeleteQueueResponse] -> ShowS
DeleteQueueResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteQueueResponse] -> ShowS
$cshowList :: [DeleteQueueResponse] -> ShowS
show :: DeleteQueueResponse -> String
$cshow :: DeleteQueueResponse -> String
showsPrec :: Int -> DeleteQueueResponse -> ShowS
$cshowsPrec :: Int -> DeleteQueueResponse -> ShowS
Prelude.Show, forall x. Rep DeleteQueueResponse x -> DeleteQueueResponse
forall x. DeleteQueueResponse -> Rep DeleteQueueResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteQueueResponse x -> DeleteQueueResponse
$cfrom :: forall x. DeleteQueueResponse -> Rep DeleteQueueResponse x
Prelude.Generic)
newDeleteQueueResponse ::
Prelude.Int ->
DeleteQueueResponse
newDeleteQueueResponse :: Int -> DeleteQueueResponse
newDeleteQueueResponse Int
pHttpStatus_ =
DeleteQueueResponse' {$sel:httpStatus:DeleteQueueResponse' :: Int
httpStatus = Int
pHttpStatus_}
deleteQueueResponse_httpStatus :: Lens.Lens' DeleteQueueResponse Prelude.Int
deleteQueueResponse_httpStatus :: Lens' DeleteQueueResponse Int
deleteQueueResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteQueueResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteQueueResponse' :: DeleteQueueResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteQueueResponse
s@DeleteQueueResponse' {} Int
a -> DeleteQueueResponse
s {$sel:httpStatus:DeleteQueueResponse' :: Int
httpStatus = Int
a} :: DeleteQueueResponse)
instance Prelude.NFData DeleteQueueResponse where
rnf :: DeleteQueueResponse -> ()
rnf DeleteQueueResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteQueueResponse' :: DeleteQueueResponse -> Int
..} = forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus