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