{-# 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.DeleteJobTemplate
(
DeleteJobTemplate (..),
newDeleteJobTemplate,
deleteJobTemplate_name,
DeleteJobTemplateResponse (..),
newDeleteJobTemplateResponse,
deleteJobTemplateResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaConvert.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteJobTemplate = DeleteJobTemplate'
{
DeleteJobTemplate -> Text
name :: Prelude.Text
}
deriving (DeleteJobTemplate -> DeleteJobTemplate -> Bool
(DeleteJobTemplate -> DeleteJobTemplate -> Bool)
-> (DeleteJobTemplate -> DeleteJobTemplate -> Bool)
-> Eq DeleteJobTemplate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteJobTemplate -> DeleteJobTemplate -> Bool
$c/= :: DeleteJobTemplate -> DeleteJobTemplate -> Bool
== :: DeleteJobTemplate -> DeleteJobTemplate -> Bool
$c== :: DeleteJobTemplate -> DeleteJobTemplate -> Bool
Prelude.Eq, ReadPrec [DeleteJobTemplate]
ReadPrec DeleteJobTemplate
Int -> ReadS DeleteJobTemplate
ReadS [DeleteJobTemplate]
(Int -> ReadS DeleteJobTemplate)
-> ReadS [DeleteJobTemplate]
-> ReadPrec DeleteJobTemplate
-> ReadPrec [DeleteJobTemplate]
-> Read DeleteJobTemplate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteJobTemplate]
$creadListPrec :: ReadPrec [DeleteJobTemplate]
readPrec :: ReadPrec DeleteJobTemplate
$creadPrec :: ReadPrec DeleteJobTemplate
readList :: ReadS [DeleteJobTemplate]
$creadList :: ReadS [DeleteJobTemplate]
readsPrec :: Int -> ReadS DeleteJobTemplate
$creadsPrec :: Int -> ReadS DeleteJobTemplate
Prelude.Read, Int -> DeleteJobTemplate -> ShowS
[DeleteJobTemplate] -> ShowS
DeleteJobTemplate -> String
(Int -> DeleteJobTemplate -> ShowS)
-> (DeleteJobTemplate -> String)
-> ([DeleteJobTemplate] -> ShowS)
-> Show DeleteJobTemplate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteJobTemplate] -> ShowS
$cshowList :: [DeleteJobTemplate] -> ShowS
show :: DeleteJobTemplate -> String
$cshow :: DeleteJobTemplate -> String
showsPrec :: Int -> DeleteJobTemplate -> ShowS
$cshowsPrec :: Int -> DeleteJobTemplate -> ShowS
Prelude.Show, (forall x. DeleteJobTemplate -> Rep DeleteJobTemplate x)
-> (forall x. Rep DeleteJobTemplate x -> DeleteJobTemplate)
-> Generic DeleteJobTemplate
forall x. Rep DeleteJobTemplate x -> DeleteJobTemplate
forall x. DeleteJobTemplate -> Rep DeleteJobTemplate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteJobTemplate x -> DeleteJobTemplate
$cfrom :: forall x. DeleteJobTemplate -> Rep DeleteJobTemplate x
Prelude.Generic)
newDeleteJobTemplate ::
Prelude.Text ->
DeleteJobTemplate
newDeleteJobTemplate :: Text -> DeleteJobTemplate
newDeleteJobTemplate Text
pName_ =
DeleteJobTemplate' :: Text -> DeleteJobTemplate
DeleteJobTemplate' {$sel:name:DeleteJobTemplate' :: Text
name = Text
pName_}
deleteJobTemplate_name :: Lens.Lens' DeleteJobTemplate Prelude.Text
deleteJobTemplate_name :: (Text -> f Text) -> DeleteJobTemplate -> f DeleteJobTemplate
deleteJobTemplate_name = (DeleteJobTemplate -> Text)
-> (DeleteJobTemplate -> Text -> DeleteJobTemplate)
-> Lens DeleteJobTemplate DeleteJobTemplate Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteJobTemplate' {Text
name :: Text
$sel:name:DeleteJobTemplate' :: DeleteJobTemplate -> Text
name} -> Text
name) (\s :: DeleteJobTemplate
s@DeleteJobTemplate' {} Text
a -> DeleteJobTemplate
s {$sel:name:DeleteJobTemplate' :: Text
name = Text
a} :: DeleteJobTemplate)
instance Core.AWSRequest DeleteJobTemplate where
type
AWSResponse DeleteJobTemplate =
DeleteJobTemplateResponse
request :: DeleteJobTemplate -> Request DeleteJobTemplate
request = Service -> DeleteJobTemplate -> Request DeleteJobTemplate
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteJobTemplate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteJobTemplate)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteJobTemplate))
-> Logger
-> Service
-> Proxy DeleteJobTemplate
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteJobTemplate)))
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 -> DeleteJobTemplateResponse
DeleteJobTemplateResponse'
(Int -> DeleteJobTemplateResponse)
-> Either String Int -> Either String DeleteJobTemplateResponse
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 DeleteJobTemplate
instance Prelude.NFData DeleteJobTemplate
instance Core.ToHeaders DeleteJobTemplate where
toHeaders :: DeleteJobTemplate -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteJobTemplate -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath DeleteJobTemplate where
toPath :: DeleteJobTemplate -> ByteString
toPath DeleteJobTemplate' {Text
name :: Text
$sel:name:DeleteJobTemplate' :: DeleteJobTemplate -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/2017-08-29/jobTemplates/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
name]
instance Core.ToQuery DeleteJobTemplate where
toQuery :: DeleteJobTemplate -> QueryString
toQuery = QueryString -> DeleteJobTemplate -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteJobTemplateResponse = DeleteJobTemplateResponse'
{
DeleteJobTemplateResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteJobTemplateResponse -> DeleteJobTemplateResponse -> Bool
(DeleteJobTemplateResponse -> DeleteJobTemplateResponse -> Bool)
-> (DeleteJobTemplateResponse -> DeleteJobTemplateResponse -> Bool)
-> Eq DeleteJobTemplateResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteJobTemplateResponse -> DeleteJobTemplateResponse -> Bool
$c/= :: DeleteJobTemplateResponse -> DeleteJobTemplateResponse -> Bool
== :: DeleteJobTemplateResponse -> DeleteJobTemplateResponse -> Bool
$c== :: DeleteJobTemplateResponse -> DeleteJobTemplateResponse -> Bool
Prelude.Eq, ReadPrec [DeleteJobTemplateResponse]
ReadPrec DeleteJobTemplateResponse
Int -> ReadS DeleteJobTemplateResponse
ReadS [DeleteJobTemplateResponse]
(Int -> ReadS DeleteJobTemplateResponse)
-> ReadS [DeleteJobTemplateResponse]
-> ReadPrec DeleteJobTemplateResponse
-> ReadPrec [DeleteJobTemplateResponse]
-> Read DeleteJobTemplateResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteJobTemplateResponse]
$creadListPrec :: ReadPrec [DeleteJobTemplateResponse]
readPrec :: ReadPrec DeleteJobTemplateResponse
$creadPrec :: ReadPrec DeleteJobTemplateResponse
readList :: ReadS [DeleteJobTemplateResponse]
$creadList :: ReadS [DeleteJobTemplateResponse]
readsPrec :: Int -> ReadS DeleteJobTemplateResponse
$creadsPrec :: Int -> ReadS DeleteJobTemplateResponse
Prelude.Read, Int -> DeleteJobTemplateResponse -> ShowS
[DeleteJobTemplateResponse] -> ShowS
DeleteJobTemplateResponse -> String
(Int -> DeleteJobTemplateResponse -> ShowS)
-> (DeleteJobTemplateResponse -> String)
-> ([DeleteJobTemplateResponse] -> ShowS)
-> Show DeleteJobTemplateResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteJobTemplateResponse] -> ShowS
$cshowList :: [DeleteJobTemplateResponse] -> ShowS
show :: DeleteJobTemplateResponse -> String
$cshow :: DeleteJobTemplateResponse -> String
showsPrec :: Int -> DeleteJobTemplateResponse -> ShowS
$cshowsPrec :: Int -> DeleteJobTemplateResponse -> ShowS
Prelude.Show, (forall x.
DeleteJobTemplateResponse -> Rep DeleteJobTemplateResponse x)
-> (forall x.
Rep DeleteJobTemplateResponse x -> DeleteJobTemplateResponse)
-> Generic DeleteJobTemplateResponse
forall x.
Rep DeleteJobTemplateResponse x -> DeleteJobTemplateResponse
forall x.
DeleteJobTemplateResponse -> Rep DeleteJobTemplateResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteJobTemplateResponse x -> DeleteJobTemplateResponse
$cfrom :: forall x.
DeleteJobTemplateResponse -> Rep DeleteJobTemplateResponse x
Prelude.Generic)
newDeleteJobTemplateResponse ::
Prelude.Int ->
DeleteJobTemplateResponse
newDeleteJobTemplateResponse :: Int -> DeleteJobTemplateResponse
newDeleteJobTemplateResponse Int
pHttpStatus_ =
DeleteJobTemplateResponse' :: Int -> DeleteJobTemplateResponse
DeleteJobTemplateResponse'
{ $sel:httpStatus:DeleteJobTemplateResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteJobTemplateResponse_httpStatus :: Lens.Lens' DeleteJobTemplateResponse Prelude.Int
deleteJobTemplateResponse_httpStatus :: (Int -> f Int)
-> DeleteJobTemplateResponse -> f DeleteJobTemplateResponse
deleteJobTemplateResponse_httpStatus = (DeleteJobTemplateResponse -> Int)
-> (DeleteJobTemplateResponse -> Int -> DeleteJobTemplateResponse)
-> Lens DeleteJobTemplateResponse DeleteJobTemplateResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteJobTemplateResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteJobTemplateResponse' :: DeleteJobTemplateResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteJobTemplateResponse
s@DeleteJobTemplateResponse' {} Int
a -> DeleteJobTemplateResponse
s {$sel:httpStatus:DeleteJobTemplateResponse' :: Int
httpStatus = Int
a} :: DeleteJobTemplateResponse)
instance Prelude.NFData DeleteJobTemplateResponse