{-# 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.Transcribe.DeleteTranscriptionJob
(
DeleteTranscriptionJob (..),
newDeleteTranscriptionJob,
deleteTranscriptionJob_transcriptionJobName,
DeleteTranscriptionJobResponse (..),
newDeleteTranscriptionJobResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Transcribe.Types
data DeleteTranscriptionJob = DeleteTranscriptionJob'
{
DeleteTranscriptionJob -> Text
transcriptionJobName :: Prelude.Text
}
deriving (DeleteTranscriptionJob -> DeleteTranscriptionJob -> Bool
(DeleteTranscriptionJob -> DeleteTranscriptionJob -> Bool)
-> (DeleteTranscriptionJob -> DeleteTranscriptionJob -> Bool)
-> Eq DeleteTranscriptionJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteTranscriptionJob -> DeleteTranscriptionJob -> Bool
$c/= :: DeleteTranscriptionJob -> DeleteTranscriptionJob -> Bool
== :: DeleteTranscriptionJob -> DeleteTranscriptionJob -> Bool
$c== :: DeleteTranscriptionJob -> DeleteTranscriptionJob -> Bool
Prelude.Eq, ReadPrec [DeleteTranscriptionJob]
ReadPrec DeleteTranscriptionJob
Int -> ReadS DeleteTranscriptionJob
ReadS [DeleteTranscriptionJob]
(Int -> ReadS DeleteTranscriptionJob)
-> ReadS [DeleteTranscriptionJob]
-> ReadPrec DeleteTranscriptionJob
-> ReadPrec [DeleteTranscriptionJob]
-> Read DeleteTranscriptionJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteTranscriptionJob]
$creadListPrec :: ReadPrec [DeleteTranscriptionJob]
readPrec :: ReadPrec DeleteTranscriptionJob
$creadPrec :: ReadPrec DeleteTranscriptionJob
readList :: ReadS [DeleteTranscriptionJob]
$creadList :: ReadS [DeleteTranscriptionJob]
readsPrec :: Int -> ReadS DeleteTranscriptionJob
$creadsPrec :: Int -> ReadS DeleteTranscriptionJob
Prelude.Read, Int -> DeleteTranscriptionJob -> ShowS
[DeleteTranscriptionJob] -> ShowS
DeleteTranscriptionJob -> String
(Int -> DeleteTranscriptionJob -> ShowS)
-> (DeleteTranscriptionJob -> String)
-> ([DeleteTranscriptionJob] -> ShowS)
-> Show DeleteTranscriptionJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteTranscriptionJob] -> ShowS
$cshowList :: [DeleteTranscriptionJob] -> ShowS
show :: DeleteTranscriptionJob -> String
$cshow :: DeleteTranscriptionJob -> String
showsPrec :: Int -> DeleteTranscriptionJob -> ShowS
$cshowsPrec :: Int -> DeleteTranscriptionJob -> ShowS
Prelude.Show, (forall x. DeleteTranscriptionJob -> Rep DeleteTranscriptionJob x)
-> (forall x.
Rep DeleteTranscriptionJob x -> DeleteTranscriptionJob)
-> Generic DeleteTranscriptionJob
forall x. Rep DeleteTranscriptionJob x -> DeleteTranscriptionJob
forall x. DeleteTranscriptionJob -> Rep DeleteTranscriptionJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteTranscriptionJob x -> DeleteTranscriptionJob
$cfrom :: forall x. DeleteTranscriptionJob -> Rep DeleteTranscriptionJob x
Prelude.Generic)
newDeleteTranscriptionJob ::
Prelude.Text ->
DeleteTranscriptionJob
newDeleteTranscriptionJob :: Text -> DeleteTranscriptionJob
newDeleteTranscriptionJob Text
pTranscriptionJobName_ =
DeleteTranscriptionJob' :: Text -> DeleteTranscriptionJob
DeleteTranscriptionJob'
{ $sel:transcriptionJobName:DeleteTranscriptionJob' :: Text
transcriptionJobName =
Text
pTranscriptionJobName_
}
deleteTranscriptionJob_transcriptionJobName :: Lens.Lens' DeleteTranscriptionJob Prelude.Text
deleteTranscriptionJob_transcriptionJobName :: (Text -> f Text)
-> DeleteTranscriptionJob -> f DeleteTranscriptionJob
deleteTranscriptionJob_transcriptionJobName = (DeleteTranscriptionJob -> Text)
-> (DeleteTranscriptionJob -> Text -> DeleteTranscriptionJob)
-> Lens DeleteTranscriptionJob DeleteTranscriptionJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteTranscriptionJob' {Text
transcriptionJobName :: Text
$sel:transcriptionJobName:DeleteTranscriptionJob' :: DeleteTranscriptionJob -> Text
transcriptionJobName} -> Text
transcriptionJobName) (\s :: DeleteTranscriptionJob
s@DeleteTranscriptionJob' {} Text
a -> DeleteTranscriptionJob
s {$sel:transcriptionJobName:DeleteTranscriptionJob' :: Text
transcriptionJobName = Text
a} :: DeleteTranscriptionJob)
instance Core.AWSRequest DeleteTranscriptionJob where
type
AWSResponse DeleteTranscriptionJob =
DeleteTranscriptionJobResponse
request :: DeleteTranscriptionJob -> Request DeleteTranscriptionJob
request = Service -> DeleteTranscriptionJob -> Request DeleteTranscriptionJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteTranscriptionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteTranscriptionJob)))
response =
AWSResponse DeleteTranscriptionJob
-> Logger
-> Service
-> Proxy DeleteTranscriptionJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteTranscriptionJob)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse DeleteTranscriptionJob
DeleteTranscriptionJobResponse
DeleteTranscriptionJobResponse'
instance Prelude.Hashable DeleteTranscriptionJob
instance Prelude.NFData DeleteTranscriptionJob
instance Core.ToHeaders DeleteTranscriptionJob where
toHeaders :: DeleteTranscriptionJob -> [Header]
toHeaders =
[Header] -> DeleteTranscriptionJob -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"Transcribe.DeleteTranscriptionJob" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteTranscriptionJob where
toJSON :: DeleteTranscriptionJob -> Value
toJSON DeleteTranscriptionJob' {Text
transcriptionJobName :: Text
$sel:transcriptionJobName:DeleteTranscriptionJob' :: DeleteTranscriptionJob -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"TranscriptionJobName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
transcriptionJobName
)
]
)
instance Core.ToPath DeleteTranscriptionJob where
toPath :: DeleteTranscriptionJob -> ByteString
toPath = ByteString -> DeleteTranscriptionJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteTranscriptionJob where
toQuery :: DeleteTranscriptionJob -> QueryString
toQuery = QueryString -> DeleteTranscriptionJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteTranscriptionJobResponse = DeleteTranscriptionJobResponse'
{
}
deriving (DeleteTranscriptionJobResponse
-> DeleteTranscriptionJobResponse -> Bool
(DeleteTranscriptionJobResponse
-> DeleteTranscriptionJobResponse -> Bool)
-> (DeleteTranscriptionJobResponse
-> DeleteTranscriptionJobResponse -> Bool)
-> Eq DeleteTranscriptionJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteTranscriptionJobResponse
-> DeleteTranscriptionJobResponse -> Bool
$c/= :: DeleteTranscriptionJobResponse
-> DeleteTranscriptionJobResponse -> Bool
== :: DeleteTranscriptionJobResponse
-> DeleteTranscriptionJobResponse -> Bool
$c== :: DeleteTranscriptionJobResponse
-> DeleteTranscriptionJobResponse -> Bool
Prelude.Eq, ReadPrec [DeleteTranscriptionJobResponse]
ReadPrec DeleteTranscriptionJobResponse
Int -> ReadS DeleteTranscriptionJobResponse
ReadS [DeleteTranscriptionJobResponse]
(Int -> ReadS DeleteTranscriptionJobResponse)
-> ReadS [DeleteTranscriptionJobResponse]
-> ReadPrec DeleteTranscriptionJobResponse
-> ReadPrec [DeleteTranscriptionJobResponse]
-> Read DeleteTranscriptionJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteTranscriptionJobResponse]
$creadListPrec :: ReadPrec [DeleteTranscriptionJobResponse]
readPrec :: ReadPrec DeleteTranscriptionJobResponse
$creadPrec :: ReadPrec DeleteTranscriptionJobResponse
readList :: ReadS [DeleteTranscriptionJobResponse]
$creadList :: ReadS [DeleteTranscriptionJobResponse]
readsPrec :: Int -> ReadS DeleteTranscriptionJobResponse
$creadsPrec :: Int -> ReadS DeleteTranscriptionJobResponse
Prelude.Read, Int -> DeleteTranscriptionJobResponse -> ShowS
[DeleteTranscriptionJobResponse] -> ShowS
DeleteTranscriptionJobResponse -> String
(Int -> DeleteTranscriptionJobResponse -> ShowS)
-> (DeleteTranscriptionJobResponse -> String)
-> ([DeleteTranscriptionJobResponse] -> ShowS)
-> Show DeleteTranscriptionJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteTranscriptionJobResponse] -> ShowS
$cshowList :: [DeleteTranscriptionJobResponse] -> ShowS
show :: DeleteTranscriptionJobResponse -> String
$cshow :: DeleteTranscriptionJobResponse -> String
showsPrec :: Int -> DeleteTranscriptionJobResponse -> ShowS
$cshowsPrec :: Int -> DeleteTranscriptionJobResponse -> ShowS
Prelude.Show, (forall x.
DeleteTranscriptionJobResponse
-> Rep DeleteTranscriptionJobResponse x)
-> (forall x.
Rep DeleteTranscriptionJobResponse x
-> DeleteTranscriptionJobResponse)
-> Generic DeleteTranscriptionJobResponse
forall x.
Rep DeleteTranscriptionJobResponse x
-> DeleteTranscriptionJobResponse
forall x.
DeleteTranscriptionJobResponse
-> Rep DeleteTranscriptionJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteTranscriptionJobResponse x
-> DeleteTranscriptionJobResponse
$cfrom :: forall x.
DeleteTranscriptionJobResponse
-> Rep DeleteTranscriptionJobResponse x
Prelude.Generic)
newDeleteTranscriptionJobResponse ::
DeleteTranscriptionJobResponse
newDeleteTranscriptionJobResponse :: DeleteTranscriptionJobResponse
newDeleteTranscriptionJobResponse =
DeleteTranscriptionJobResponse
DeleteTranscriptionJobResponse'
instance
Prelude.NFData
DeleteTranscriptionJobResponse