{-# 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.Translate.DeleteTerminology
(
DeleteTerminology (..),
newDeleteTerminology,
deleteTerminology_name,
DeleteTerminologyResponse (..),
newDeleteTerminologyResponse,
)
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.Translate.Types
data DeleteTerminology = DeleteTerminology'
{
DeleteTerminology -> Text
name :: Prelude.Text
}
deriving (DeleteTerminology -> DeleteTerminology -> Bool
(DeleteTerminology -> DeleteTerminology -> Bool)
-> (DeleteTerminology -> DeleteTerminology -> Bool)
-> Eq DeleteTerminology
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteTerminology -> DeleteTerminology -> Bool
$c/= :: DeleteTerminology -> DeleteTerminology -> Bool
== :: DeleteTerminology -> DeleteTerminology -> Bool
$c== :: DeleteTerminology -> DeleteTerminology -> Bool
Prelude.Eq, ReadPrec [DeleteTerminology]
ReadPrec DeleteTerminology
Int -> ReadS DeleteTerminology
ReadS [DeleteTerminology]
(Int -> ReadS DeleteTerminology)
-> ReadS [DeleteTerminology]
-> ReadPrec DeleteTerminology
-> ReadPrec [DeleteTerminology]
-> Read DeleteTerminology
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteTerminology]
$creadListPrec :: ReadPrec [DeleteTerminology]
readPrec :: ReadPrec DeleteTerminology
$creadPrec :: ReadPrec DeleteTerminology
readList :: ReadS [DeleteTerminology]
$creadList :: ReadS [DeleteTerminology]
readsPrec :: Int -> ReadS DeleteTerminology
$creadsPrec :: Int -> ReadS DeleteTerminology
Prelude.Read, Int -> DeleteTerminology -> ShowS
[DeleteTerminology] -> ShowS
DeleteTerminology -> String
(Int -> DeleteTerminology -> ShowS)
-> (DeleteTerminology -> String)
-> ([DeleteTerminology] -> ShowS)
-> Show DeleteTerminology
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteTerminology] -> ShowS
$cshowList :: [DeleteTerminology] -> ShowS
show :: DeleteTerminology -> String
$cshow :: DeleteTerminology -> String
showsPrec :: Int -> DeleteTerminology -> ShowS
$cshowsPrec :: Int -> DeleteTerminology -> ShowS
Prelude.Show, (forall x. DeleteTerminology -> Rep DeleteTerminology x)
-> (forall x. Rep DeleteTerminology x -> DeleteTerminology)
-> Generic DeleteTerminology
forall x. Rep DeleteTerminology x -> DeleteTerminology
forall x. DeleteTerminology -> Rep DeleteTerminology x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteTerminology x -> DeleteTerminology
$cfrom :: forall x. DeleteTerminology -> Rep DeleteTerminology x
Prelude.Generic)
newDeleteTerminology ::
Prelude.Text ->
DeleteTerminology
newDeleteTerminology :: Text -> DeleteTerminology
newDeleteTerminology Text
pName_ =
DeleteTerminology' :: Text -> DeleteTerminology
DeleteTerminology' {$sel:name:DeleteTerminology' :: Text
name = Text
pName_}
deleteTerminology_name :: Lens.Lens' DeleteTerminology Prelude.Text
deleteTerminology_name :: (Text -> f Text) -> DeleteTerminology -> f DeleteTerminology
deleteTerminology_name = (DeleteTerminology -> Text)
-> (DeleteTerminology -> Text -> DeleteTerminology)
-> Lens DeleteTerminology DeleteTerminology Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteTerminology' {Text
name :: Text
$sel:name:DeleteTerminology' :: DeleteTerminology -> Text
name} -> Text
name) (\s :: DeleteTerminology
s@DeleteTerminology' {} Text
a -> DeleteTerminology
s {$sel:name:DeleteTerminology' :: Text
name = Text
a} :: DeleteTerminology)
instance Core.AWSRequest DeleteTerminology where
type
AWSResponse DeleteTerminology =
DeleteTerminologyResponse
request :: DeleteTerminology -> Request DeleteTerminology
request = Service -> DeleteTerminology -> Request DeleteTerminology
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteTerminology
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteTerminology)))
response =
AWSResponse DeleteTerminology
-> Logger
-> Service
-> Proxy DeleteTerminology
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteTerminology)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteTerminology
DeleteTerminologyResponse
DeleteTerminologyResponse'
instance Prelude.Hashable DeleteTerminology
instance Prelude.NFData DeleteTerminology
instance Core.ToHeaders DeleteTerminology where
toHeaders :: DeleteTerminology -> [Header]
toHeaders =
[Header] -> DeleteTerminology -> [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
"AWSShineFrontendService_20170701.DeleteTerminology" ::
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 DeleteTerminology where
toJSON :: DeleteTerminology -> Value
toJSON DeleteTerminology' {Text
name :: Text
$sel:name:DeleteTerminology' :: DeleteTerminology -> 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
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)]
)
instance Core.ToPath DeleteTerminology where
toPath :: DeleteTerminology -> ByteString
toPath = ByteString -> DeleteTerminology -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteTerminology where
toQuery :: DeleteTerminology -> QueryString
toQuery = QueryString -> DeleteTerminology -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteTerminologyResponse = DeleteTerminologyResponse'
{
}
deriving (DeleteTerminologyResponse -> DeleteTerminologyResponse -> Bool
(DeleteTerminologyResponse -> DeleteTerminologyResponse -> Bool)
-> (DeleteTerminologyResponse -> DeleteTerminologyResponse -> Bool)
-> Eq DeleteTerminologyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteTerminologyResponse -> DeleteTerminologyResponse -> Bool
$c/= :: DeleteTerminologyResponse -> DeleteTerminologyResponse -> Bool
== :: DeleteTerminologyResponse -> DeleteTerminologyResponse -> Bool
$c== :: DeleteTerminologyResponse -> DeleteTerminologyResponse -> Bool
Prelude.Eq, ReadPrec [DeleteTerminologyResponse]
ReadPrec DeleteTerminologyResponse
Int -> ReadS DeleteTerminologyResponse
ReadS [DeleteTerminologyResponse]
(Int -> ReadS DeleteTerminologyResponse)
-> ReadS [DeleteTerminologyResponse]
-> ReadPrec DeleteTerminologyResponse
-> ReadPrec [DeleteTerminologyResponse]
-> Read DeleteTerminologyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteTerminologyResponse]
$creadListPrec :: ReadPrec [DeleteTerminologyResponse]
readPrec :: ReadPrec DeleteTerminologyResponse
$creadPrec :: ReadPrec DeleteTerminologyResponse
readList :: ReadS [DeleteTerminologyResponse]
$creadList :: ReadS [DeleteTerminologyResponse]
readsPrec :: Int -> ReadS DeleteTerminologyResponse
$creadsPrec :: Int -> ReadS DeleteTerminologyResponse
Prelude.Read, Int -> DeleteTerminologyResponse -> ShowS
[DeleteTerminologyResponse] -> ShowS
DeleteTerminologyResponse -> String
(Int -> DeleteTerminologyResponse -> ShowS)
-> (DeleteTerminologyResponse -> String)
-> ([DeleteTerminologyResponse] -> ShowS)
-> Show DeleteTerminologyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteTerminologyResponse] -> ShowS
$cshowList :: [DeleteTerminologyResponse] -> ShowS
show :: DeleteTerminologyResponse -> String
$cshow :: DeleteTerminologyResponse -> String
showsPrec :: Int -> DeleteTerminologyResponse -> ShowS
$cshowsPrec :: Int -> DeleteTerminologyResponse -> ShowS
Prelude.Show, (forall x.
DeleteTerminologyResponse -> Rep DeleteTerminologyResponse x)
-> (forall x.
Rep DeleteTerminologyResponse x -> DeleteTerminologyResponse)
-> Generic DeleteTerminologyResponse
forall x.
Rep DeleteTerminologyResponse x -> DeleteTerminologyResponse
forall x.
DeleteTerminologyResponse -> Rep DeleteTerminologyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteTerminologyResponse x -> DeleteTerminologyResponse
$cfrom :: forall x.
DeleteTerminologyResponse -> Rep DeleteTerminologyResponse x
Prelude.Generic)
newDeleteTerminologyResponse ::
DeleteTerminologyResponse
newDeleteTerminologyResponse :: DeleteTerminologyResponse
newDeleteTerminologyResponse =
DeleteTerminologyResponse
DeleteTerminologyResponse'
instance Prelude.NFData DeleteTerminologyResponse