{-# 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.DeleteCallAnalyticsJob
(
DeleteCallAnalyticsJob (..),
newDeleteCallAnalyticsJob,
deleteCallAnalyticsJob_callAnalyticsJobName,
DeleteCallAnalyticsJobResponse (..),
newDeleteCallAnalyticsJobResponse,
deleteCallAnalyticsJobResponse_httpStatus,
)
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 DeleteCallAnalyticsJob = DeleteCallAnalyticsJob'
{
DeleteCallAnalyticsJob -> Text
callAnalyticsJobName :: Prelude.Text
}
deriving (DeleteCallAnalyticsJob -> DeleteCallAnalyticsJob -> Bool
(DeleteCallAnalyticsJob -> DeleteCallAnalyticsJob -> Bool)
-> (DeleteCallAnalyticsJob -> DeleteCallAnalyticsJob -> Bool)
-> Eq DeleteCallAnalyticsJob
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCallAnalyticsJob -> DeleteCallAnalyticsJob -> Bool
$c/= :: DeleteCallAnalyticsJob -> DeleteCallAnalyticsJob -> Bool
== :: DeleteCallAnalyticsJob -> DeleteCallAnalyticsJob -> Bool
$c== :: DeleteCallAnalyticsJob -> DeleteCallAnalyticsJob -> Bool
Prelude.Eq, ReadPrec [DeleteCallAnalyticsJob]
ReadPrec DeleteCallAnalyticsJob
Int -> ReadS DeleteCallAnalyticsJob
ReadS [DeleteCallAnalyticsJob]
(Int -> ReadS DeleteCallAnalyticsJob)
-> ReadS [DeleteCallAnalyticsJob]
-> ReadPrec DeleteCallAnalyticsJob
-> ReadPrec [DeleteCallAnalyticsJob]
-> Read DeleteCallAnalyticsJob
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteCallAnalyticsJob]
$creadListPrec :: ReadPrec [DeleteCallAnalyticsJob]
readPrec :: ReadPrec DeleteCallAnalyticsJob
$creadPrec :: ReadPrec DeleteCallAnalyticsJob
readList :: ReadS [DeleteCallAnalyticsJob]
$creadList :: ReadS [DeleteCallAnalyticsJob]
readsPrec :: Int -> ReadS DeleteCallAnalyticsJob
$creadsPrec :: Int -> ReadS DeleteCallAnalyticsJob
Prelude.Read, Int -> DeleteCallAnalyticsJob -> ShowS
[DeleteCallAnalyticsJob] -> ShowS
DeleteCallAnalyticsJob -> String
(Int -> DeleteCallAnalyticsJob -> ShowS)
-> (DeleteCallAnalyticsJob -> String)
-> ([DeleteCallAnalyticsJob] -> ShowS)
-> Show DeleteCallAnalyticsJob
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteCallAnalyticsJob] -> ShowS
$cshowList :: [DeleteCallAnalyticsJob] -> ShowS
show :: DeleteCallAnalyticsJob -> String
$cshow :: DeleteCallAnalyticsJob -> String
showsPrec :: Int -> DeleteCallAnalyticsJob -> ShowS
$cshowsPrec :: Int -> DeleteCallAnalyticsJob -> ShowS
Prelude.Show, (forall x. DeleteCallAnalyticsJob -> Rep DeleteCallAnalyticsJob x)
-> (forall x.
Rep DeleteCallAnalyticsJob x -> DeleteCallAnalyticsJob)
-> Generic DeleteCallAnalyticsJob
forall x. Rep DeleteCallAnalyticsJob x -> DeleteCallAnalyticsJob
forall x. DeleteCallAnalyticsJob -> Rep DeleteCallAnalyticsJob x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteCallAnalyticsJob x -> DeleteCallAnalyticsJob
$cfrom :: forall x. DeleteCallAnalyticsJob -> Rep DeleteCallAnalyticsJob x
Prelude.Generic)
newDeleteCallAnalyticsJob ::
Prelude.Text ->
DeleteCallAnalyticsJob
newDeleteCallAnalyticsJob :: Text -> DeleteCallAnalyticsJob
newDeleteCallAnalyticsJob Text
pCallAnalyticsJobName_ =
DeleteCallAnalyticsJob' :: Text -> DeleteCallAnalyticsJob
DeleteCallAnalyticsJob'
{ $sel:callAnalyticsJobName:DeleteCallAnalyticsJob' :: Text
callAnalyticsJobName =
Text
pCallAnalyticsJobName_
}
deleteCallAnalyticsJob_callAnalyticsJobName :: Lens.Lens' DeleteCallAnalyticsJob Prelude.Text
deleteCallAnalyticsJob_callAnalyticsJobName :: (Text -> f Text)
-> DeleteCallAnalyticsJob -> f DeleteCallAnalyticsJob
deleteCallAnalyticsJob_callAnalyticsJobName = (DeleteCallAnalyticsJob -> Text)
-> (DeleteCallAnalyticsJob -> Text -> DeleteCallAnalyticsJob)
-> Lens DeleteCallAnalyticsJob DeleteCallAnalyticsJob Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCallAnalyticsJob' {Text
callAnalyticsJobName :: Text
$sel:callAnalyticsJobName:DeleteCallAnalyticsJob' :: DeleteCallAnalyticsJob -> Text
callAnalyticsJobName} -> Text
callAnalyticsJobName) (\s :: DeleteCallAnalyticsJob
s@DeleteCallAnalyticsJob' {} Text
a -> DeleteCallAnalyticsJob
s {$sel:callAnalyticsJobName:DeleteCallAnalyticsJob' :: Text
callAnalyticsJobName = Text
a} :: DeleteCallAnalyticsJob)
instance Core.AWSRequest DeleteCallAnalyticsJob where
type
AWSResponse DeleteCallAnalyticsJob =
DeleteCallAnalyticsJobResponse
request :: DeleteCallAnalyticsJob -> Request DeleteCallAnalyticsJob
request = Service -> DeleteCallAnalyticsJob -> Request DeleteCallAnalyticsJob
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteCallAnalyticsJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteCallAnalyticsJob)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteCallAnalyticsJob))
-> Logger
-> Service
-> Proxy DeleteCallAnalyticsJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteCallAnalyticsJob)))
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 -> DeleteCallAnalyticsJobResponse
DeleteCallAnalyticsJobResponse'
(Int -> DeleteCallAnalyticsJobResponse)
-> Either String Int
-> Either String DeleteCallAnalyticsJobResponse
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 DeleteCallAnalyticsJob
instance Prelude.NFData DeleteCallAnalyticsJob
instance Core.ToHeaders DeleteCallAnalyticsJob where
toHeaders :: DeleteCallAnalyticsJob -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteCallAnalyticsJob -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Transcribe.DeleteCallAnalyticsJob" ::
Prelude.ByteString
),
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.ToJSON DeleteCallAnalyticsJob where
toJSON :: DeleteCallAnalyticsJob -> Value
toJSON DeleteCallAnalyticsJob' {Text
callAnalyticsJobName :: Text
$sel:callAnalyticsJobName:DeleteCallAnalyticsJob' :: DeleteCallAnalyticsJob -> 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
"CallAnalyticsJobName"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
callAnalyticsJobName
)
]
)
instance Core.ToPath DeleteCallAnalyticsJob where
toPath :: DeleteCallAnalyticsJob -> ByteString
toPath = ByteString -> DeleteCallAnalyticsJob -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteCallAnalyticsJob where
toQuery :: DeleteCallAnalyticsJob -> QueryString
toQuery = QueryString -> DeleteCallAnalyticsJob -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteCallAnalyticsJobResponse = DeleteCallAnalyticsJobResponse'
{
DeleteCallAnalyticsJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteCallAnalyticsJobResponse
-> DeleteCallAnalyticsJobResponse -> Bool
(DeleteCallAnalyticsJobResponse
-> DeleteCallAnalyticsJobResponse -> Bool)
-> (DeleteCallAnalyticsJobResponse
-> DeleteCallAnalyticsJobResponse -> Bool)
-> Eq DeleteCallAnalyticsJobResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteCallAnalyticsJobResponse
-> DeleteCallAnalyticsJobResponse -> Bool
$c/= :: DeleteCallAnalyticsJobResponse
-> DeleteCallAnalyticsJobResponse -> Bool
== :: DeleteCallAnalyticsJobResponse
-> DeleteCallAnalyticsJobResponse -> Bool
$c== :: DeleteCallAnalyticsJobResponse
-> DeleteCallAnalyticsJobResponse -> Bool
Prelude.Eq, ReadPrec [DeleteCallAnalyticsJobResponse]
ReadPrec DeleteCallAnalyticsJobResponse
Int -> ReadS DeleteCallAnalyticsJobResponse
ReadS [DeleteCallAnalyticsJobResponse]
(Int -> ReadS DeleteCallAnalyticsJobResponse)
-> ReadS [DeleteCallAnalyticsJobResponse]
-> ReadPrec DeleteCallAnalyticsJobResponse
-> ReadPrec [DeleteCallAnalyticsJobResponse]
-> Read DeleteCallAnalyticsJobResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteCallAnalyticsJobResponse]
$creadListPrec :: ReadPrec [DeleteCallAnalyticsJobResponse]
readPrec :: ReadPrec DeleteCallAnalyticsJobResponse
$creadPrec :: ReadPrec DeleteCallAnalyticsJobResponse
readList :: ReadS [DeleteCallAnalyticsJobResponse]
$creadList :: ReadS [DeleteCallAnalyticsJobResponse]
readsPrec :: Int -> ReadS DeleteCallAnalyticsJobResponse
$creadsPrec :: Int -> ReadS DeleteCallAnalyticsJobResponse
Prelude.Read, Int -> DeleteCallAnalyticsJobResponse -> ShowS
[DeleteCallAnalyticsJobResponse] -> ShowS
DeleteCallAnalyticsJobResponse -> String
(Int -> DeleteCallAnalyticsJobResponse -> ShowS)
-> (DeleteCallAnalyticsJobResponse -> String)
-> ([DeleteCallAnalyticsJobResponse] -> ShowS)
-> Show DeleteCallAnalyticsJobResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteCallAnalyticsJobResponse] -> ShowS
$cshowList :: [DeleteCallAnalyticsJobResponse] -> ShowS
show :: DeleteCallAnalyticsJobResponse -> String
$cshow :: DeleteCallAnalyticsJobResponse -> String
showsPrec :: Int -> DeleteCallAnalyticsJobResponse -> ShowS
$cshowsPrec :: Int -> DeleteCallAnalyticsJobResponse -> ShowS
Prelude.Show, (forall x.
DeleteCallAnalyticsJobResponse
-> Rep DeleteCallAnalyticsJobResponse x)
-> (forall x.
Rep DeleteCallAnalyticsJobResponse x
-> DeleteCallAnalyticsJobResponse)
-> Generic DeleteCallAnalyticsJobResponse
forall x.
Rep DeleteCallAnalyticsJobResponse x
-> DeleteCallAnalyticsJobResponse
forall x.
DeleteCallAnalyticsJobResponse
-> Rep DeleteCallAnalyticsJobResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteCallAnalyticsJobResponse x
-> DeleteCallAnalyticsJobResponse
$cfrom :: forall x.
DeleteCallAnalyticsJobResponse
-> Rep DeleteCallAnalyticsJobResponse x
Prelude.Generic)
newDeleteCallAnalyticsJobResponse ::
Prelude.Int ->
DeleteCallAnalyticsJobResponse
newDeleteCallAnalyticsJobResponse :: Int -> DeleteCallAnalyticsJobResponse
newDeleteCallAnalyticsJobResponse Int
pHttpStatus_ =
DeleteCallAnalyticsJobResponse' :: Int -> DeleteCallAnalyticsJobResponse
DeleteCallAnalyticsJobResponse'
{ $sel:httpStatus:DeleteCallAnalyticsJobResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteCallAnalyticsJobResponse_httpStatus :: Lens.Lens' DeleteCallAnalyticsJobResponse Prelude.Int
deleteCallAnalyticsJobResponse_httpStatus :: (Int -> f Int)
-> DeleteCallAnalyticsJobResponse
-> f DeleteCallAnalyticsJobResponse
deleteCallAnalyticsJobResponse_httpStatus = (DeleteCallAnalyticsJobResponse -> Int)
-> (DeleteCallAnalyticsJobResponse
-> Int -> DeleteCallAnalyticsJobResponse)
-> Lens
DeleteCallAnalyticsJobResponse
DeleteCallAnalyticsJobResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteCallAnalyticsJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteCallAnalyticsJobResponse' :: DeleteCallAnalyticsJobResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteCallAnalyticsJobResponse
s@DeleteCallAnalyticsJobResponse' {} Int
a -> DeleteCallAnalyticsJobResponse
s {$sel:httpStatus:DeleteCallAnalyticsJobResponse' :: Int
httpStatus = Int
a} :: DeleteCallAnalyticsJobResponse)
instance
Prelude.NFData
DeleteCallAnalyticsJobResponse