{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:callAnalyticsJobName:DeleteCallAnalyticsJob' :: Text
callAnalyticsJobName =
Text
pCallAnalyticsJobName_
}
deleteCallAnalyticsJob_callAnalyticsJobName :: Lens.Lens' DeleteCallAnalyticsJob Prelude.Text
deleteCallAnalyticsJob_callAnalyticsJobName :: Lens' DeleteCallAnalyticsJob Text
deleteCallAnalyticsJob_callAnalyticsJobName = 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 :: (Service -> Service)
-> DeleteCallAnalyticsJob -> Request DeleteCallAnalyticsJob
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteCallAnalyticsJob
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteCallAnalyticsJob)))
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 -> DeleteCallAnalyticsJobResponse
DeleteCallAnalyticsJobResponse'
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 DeleteCallAnalyticsJob where
hashWithSalt :: Int -> DeleteCallAnalyticsJob -> Int
hashWithSalt Int
_salt DeleteCallAnalyticsJob' {Text
callAnalyticsJobName :: Text
$sel:callAnalyticsJobName:DeleteCallAnalyticsJob' :: DeleteCallAnalyticsJob -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
callAnalyticsJobName
instance Prelude.NFData DeleteCallAnalyticsJob where
rnf :: DeleteCallAnalyticsJob -> ()
rnf DeleteCallAnalyticsJob' {Text
callAnalyticsJobName :: Text
$sel:callAnalyticsJobName:DeleteCallAnalyticsJob' :: DeleteCallAnalyticsJob -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
callAnalyticsJobName
instance Data.ToHeaders DeleteCallAnalyticsJob where
toHeaders :: DeleteCallAnalyticsJob -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"Transcribe.DeleteCallAnalyticsJob" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteCallAnalyticsJob where
toJSON :: DeleteCallAnalyticsJob -> Value
toJSON DeleteCallAnalyticsJob' {Text
callAnalyticsJobName :: Text
$sel:callAnalyticsJobName:DeleteCallAnalyticsJob' :: DeleteCallAnalyticsJob -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
( Key
"CallAnalyticsJobName"
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
callAnalyticsJobName
)
]
)
instance Data.ToPath DeleteCallAnalyticsJob where
toPath :: DeleteCallAnalyticsJob -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteCallAnalyticsJob where
toQuery :: DeleteCallAnalyticsJob -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteCallAnalyticsJobResponse = DeleteCallAnalyticsJobResponse'
{
DeleteCallAnalyticsJobResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteCallAnalyticsJobResponse
-> DeleteCallAnalyticsJobResponse -> Bool
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]
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
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.
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'
{ $sel:httpStatus:DeleteCallAnalyticsJobResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteCallAnalyticsJobResponse_httpStatus :: Lens.Lens' DeleteCallAnalyticsJobResponse Prelude.Int
deleteCallAnalyticsJobResponse_httpStatus :: Lens' DeleteCallAnalyticsJobResponse Int
deleteCallAnalyticsJobResponse_httpStatus = 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
where
rnf :: DeleteCallAnalyticsJobResponse -> ()
rnf DeleteCallAnalyticsJobResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteCallAnalyticsJobResponse' :: DeleteCallAnalyticsJobResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus