{-# 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.ElasticTranscoder.DeletePipeline
(
DeletePipeline (..),
newDeletePipeline,
deletePipeline_id,
DeletePipelineResponse (..),
newDeletePipelineResponse,
deletePipelineResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ElasticTranscoder.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 DeletePipeline = DeletePipeline'
{
DeletePipeline -> Text
id :: Prelude.Text
}
deriving (DeletePipeline -> DeletePipeline -> Bool
(DeletePipeline -> DeletePipeline -> Bool)
-> (DeletePipeline -> DeletePipeline -> Bool) -> Eq DeletePipeline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePipeline -> DeletePipeline -> Bool
$c/= :: DeletePipeline -> DeletePipeline -> Bool
== :: DeletePipeline -> DeletePipeline -> Bool
$c== :: DeletePipeline -> DeletePipeline -> Bool
Prelude.Eq, ReadPrec [DeletePipeline]
ReadPrec DeletePipeline
Int -> ReadS DeletePipeline
ReadS [DeletePipeline]
(Int -> ReadS DeletePipeline)
-> ReadS [DeletePipeline]
-> ReadPrec DeletePipeline
-> ReadPrec [DeletePipeline]
-> Read DeletePipeline
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePipeline]
$creadListPrec :: ReadPrec [DeletePipeline]
readPrec :: ReadPrec DeletePipeline
$creadPrec :: ReadPrec DeletePipeline
readList :: ReadS [DeletePipeline]
$creadList :: ReadS [DeletePipeline]
readsPrec :: Int -> ReadS DeletePipeline
$creadsPrec :: Int -> ReadS DeletePipeline
Prelude.Read, Int -> DeletePipeline -> ShowS
[DeletePipeline] -> ShowS
DeletePipeline -> String
(Int -> DeletePipeline -> ShowS)
-> (DeletePipeline -> String)
-> ([DeletePipeline] -> ShowS)
-> Show DeletePipeline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePipeline] -> ShowS
$cshowList :: [DeletePipeline] -> ShowS
show :: DeletePipeline -> String
$cshow :: DeletePipeline -> String
showsPrec :: Int -> DeletePipeline -> ShowS
$cshowsPrec :: Int -> DeletePipeline -> ShowS
Prelude.Show, (forall x. DeletePipeline -> Rep DeletePipeline x)
-> (forall x. Rep DeletePipeline x -> DeletePipeline)
-> Generic DeletePipeline
forall x. Rep DeletePipeline x -> DeletePipeline
forall x. DeletePipeline -> Rep DeletePipeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeletePipeline x -> DeletePipeline
$cfrom :: forall x. DeletePipeline -> Rep DeletePipeline x
Prelude.Generic)
newDeletePipeline ::
Prelude.Text ->
DeletePipeline
newDeletePipeline :: Text -> DeletePipeline
newDeletePipeline Text
pId_ = DeletePipeline' :: Text -> DeletePipeline
DeletePipeline' {$sel:id:DeletePipeline' :: Text
id = Text
pId_}
deletePipeline_id :: Lens.Lens' DeletePipeline Prelude.Text
deletePipeline_id :: (Text -> f Text) -> DeletePipeline -> f DeletePipeline
deletePipeline_id = (DeletePipeline -> Text)
-> (DeletePipeline -> Text -> DeletePipeline)
-> Lens DeletePipeline DeletePipeline Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePipeline' {Text
id :: Text
$sel:id:DeletePipeline' :: DeletePipeline -> Text
id} -> Text
id) (\s :: DeletePipeline
s@DeletePipeline' {} Text
a -> DeletePipeline
s {$sel:id:DeletePipeline' :: Text
id = Text
a} :: DeletePipeline)
instance Core.AWSRequest DeletePipeline where
type
AWSResponse DeletePipeline =
DeletePipelineResponse
request :: DeletePipeline -> Request DeletePipeline
request = Service -> DeletePipeline -> Request DeletePipeline
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeletePipeline
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeletePipeline)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeletePipeline))
-> Logger
-> Service
-> Proxy DeletePipeline
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeletePipeline)))
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 -> DeletePipelineResponse
DeletePipelineResponse'
(Int -> DeletePipelineResponse)
-> Either String Int -> Either String DeletePipelineResponse
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 DeletePipeline
instance Prelude.NFData DeletePipeline
instance Core.ToHeaders DeletePipeline where
toHeaders :: DeletePipeline -> ResponseHeaders
toHeaders = ResponseHeaders -> DeletePipeline -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeletePipeline where
toPath :: DeletePipeline -> ByteString
toPath DeletePipeline' {Text
id :: Text
$sel:id:DeletePipeline' :: DeletePipeline -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/2012-09-25/pipelines/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id]
instance Core.ToQuery DeletePipeline where
toQuery :: DeletePipeline -> QueryString
toQuery = QueryString -> DeletePipeline -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeletePipelineResponse = DeletePipelineResponse'
{
DeletePipelineResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeletePipelineResponse -> DeletePipelineResponse -> Bool
(DeletePipelineResponse -> DeletePipelineResponse -> Bool)
-> (DeletePipelineResponse -> DeletePipelineResponse -> Bool)
-> Eq DeletePipelineResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeletePipelineResponse -> DeletePipelineResponse -> Bool
$c/= :: DeletePipelineResponse -> DeletePipelineResponse -> Bool
== :: DeletePipelineResponse -> DeletePipelineResponse -> Bool
$c== :: DeletePipelineResponse -> DeletePipelineResponse -> Bool
Prelude.Eq, ReadPrec [DeletePipelineResponse]
ReadPrec DeletePipelineResponse
Int -> ReadS DeletePipelineResponse
ReadS [DeletePipelineResponse]
(Int -> ReadS DeletePipelineResponse)
-> ReadS [DeletePipelineResponse]
-> ReadPrec DeletePipelineResponse
-> ReadPrec [DeletePipelineResponse]
-> Read DeletePipelineResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeletePipelineResponse]
$creadListPrec :: ReadPrec [DeletePipelineResponse]
readPrec :: ReadPrec DeletePipelineResponse
$creadPrec :: ReadPrec DeletePipelineResponse
readList :: ReadS [DeletePipelineResponse]
$creadList :: ReadS [DeletePipelineResponse]
readsPrec :: Int -> ReadS DeletePipelineResponse
$creadsPrec :: Int -> ReadS DeletePipelineResponse
Prelude.Read, Int -> DeletePipelineResponse -> ShowS
[DeletePipelineResponse] -> ShowS
DeletePipelineResponse -> String
(Int -> DeletePipelineResponse -> ShowS)
-> (DeletePipelineResponse -> String)
-> ([DeletePipelineResponse] -> ShowS)
-> Show DeletePipelineResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeletePipelineResponse] -> ShowS
$cshowList :: [DeletePipelineResponse] -> ShowS
show :: DeletePipelineResponse -> String
$cshow :: DeletePipelineResponse -> String
showsPrec :: Int -> DeletePipelineResponse -> ShowS
$cshowsPrec :: Int -> DeletePipelineResponse -> ShowS
Prelude.Show, (forall x. DeletePipelineResponse -> Rep DeletePipelineResponse x)
-> (forall x.
Rep DeletePipelineResponse x -> DeletePipelineResponse)
-> Generic DeletePipelineResponse
forall x. Rep DeletePipelineResponse x -> DeletePipelineResponse
forall x. DeletePipelineResponse -> Rep DeletePipelineResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeletePipelineResponse x -> DeletePipelineResponse
$cfrom :: forall x. DeletePipelineResponse -> Rep DeletePipelineResponse x
Prelude.Generic)
newDeletePipelineResponse ::
Prelude.Int ->
DeletePipelineResponse
newDeletePipelineResponse :: Int -> DeletePipelineResponse
newDeletePipelineResponse Int
pHttpStatus_ =
DeletePipelineResponse' :: Int -> DeletePipelineResponse
DeletePipelineResponse' {$sel:httpStatus:DeletePipelineResponse' :: Int
httpStatus = Int
pHttpStatus_}
deletePipelineResponse_httpStatus :: Lens.Lens' DeletePipelineResponse Prelude.Int
deletePipelineResponse_httpStatus :: (Int -> f Int)
-> DeletePipelineResponse -> f DeletePipelineResponse
deletePipelineResponse_httpStatus = (DeletePipelineResponse -> Int)
-> (DeletePipelineResponse -> Int -> DeletePipelineResponse)
-> Lens DeletePipelineResponse DeletePipelineResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeletePipelineResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeletePipelineResponse' :: DeletePipelineResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeletePipelineResponse
s@DeletePipelineResponse' {} Int
a -> DeletePipelineResponse
s {$sel:httpStatus:DeletePipelineResponse' :: Int
httpStatus = Int
a} :: DeletePipelineResponse)
instance Prelude.NFData DeletePipelineResponse